Ejemplo n.º 1
0
    def __init__(self, session, timer, setup):
        # Need to create some variables before Setup reads setup.xml
        self.timer = timer
        self.createConfig()

        Setup.__init__(self, session, setup)

        # Are these actually skinned anywhere?
        self["oktext"] = Label(_("Save"))
        self["canceltext"] = Label(_("Cancel"))
        self["ok"] = Pixmap()
        self["cancel"] = Pixmap()

        self["actions"] = HelpableActionMap(
            self, ["ConfigListActions", "GlobalActions", "PiPSetupActions"], {
                "save": (self.keySave, _("Save timer")),
                "cancel":
                (self.keyCancel, _("Cancel timer creation / changes")),
                "close":
                (self.keyCancel, _("Cancel timer creation / changes")),
                "volumeUp": (self.incrementStart, _("Increment start time")),
                "volumeDown": (self.decrementStart, _("Decrement start time")),
                "size+": (self.incrementEnd, _("Increment end time")),
                "size-": (self.decrementEnd, _("Decrement end time")),
            },
            prio=-1)
Ejemplo n.º 2
0
    def __init__(self,
                 session,
                 setup,
                 plugin=None,
                 menu_path=None,
                 PluginLanguageDomain=None):
        try:
            Setup.__init__(self, session, setup, plugin, menu_path,
                           PluginLanguageDomain)
        except TypeError:
            Setup.__init__(self, session, setup, plugin)

        self["actions2"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"], {
                "ok": self.keySave,
                "cancel": self.keyCancel,
                "menu": self.keyCancel,
                "red": self.keyCancel,
                "green": self.keySave,
                "yellow": self.keyGo,
            }, -2)

        self["key_red"] = StaticText(_("Exit"))
        self["key_green"] = StaticText(_("Save"))
        self["key_yellow"] = StaticText(_("Import"))
Ejemplo n.º 3
0
 def __init__(self, session, device):
     self.device = device
     inputDevices.currentDevice = device
     configItem = getattr(config.inputDevices, device)
     self.enableEntry = getConfigListEntry(
         self.formatItemText(_("Change device settings")),
         configItem.enabled,
         self.formatItemDescription(
             configItem.enabled,
             _("Select 'Yes' to enable editing of this device's settings. Selecting 'No' resets the devices settings to their default values."
               )))
     self.nameEntry = getConfigListEntry(
         self.formatItemText(_("Device name")), configItem.name,
         self.formatItemDescription(configItem.name,
                                    _("Enter a new name for this device.")))
     self.delayEntry = getConfigListEntry(
         self.formatItemText(_("Delay before key repeat starts (ms)")),
         configItem.delay,
         self.formatItemDescription(
             configItem.delay,
             _("Select the time delay before the button starts repeating.")
         ))
     self.repeatEntry = getConfigListEntry(
         self.formatItemText(
             _("Interval between keys when repeating (ms)")),
         configItem.repeat,
         self.formatItemDescription(
             configItem.repeat,
             _("Select the time delay between each repeat of the button.")))
     Setup.__init__(self, session, "DriverSettings")
     self.setTitle(_("Input Device Driver Setup"))
     self.skinName.insert(0, "InputDeviceDriverSetup")
Ejemplo n.º 4
0
	def __init__(self, session, setup, plugin=None, menu_path=None, PluginLanguageDomain=None):
		try:
			Setup.__init__(self, session, setup, plugin, menu_path, PluginLanguageDomain)
		except TypeError:
			Setup.__init__(self, session, setup, plugin)

		self.skinName = ["ABMCustomMixImporterScreen", "Setup4buttons"]

		self["actions2"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"ok": self.keySave,
			"cancel": self.keyCancel,
			"menu": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow": self.keyGo,
			"blue": self.keyDelete
		}, -2)

		self["key_red"] = StaticText(_("Exit"))
		self["key_green"] = StaticText(_("Save setup"))
		self["key_yellow"] = StaticText(_("Fetch file"))
		self["key_blue"] = StaticText()

		self.onLayoutFinish.append(self.updatebuttontext)
Ejemplo n.º 5
0
 def __init__(self, session):
     self.softcam = CamControl("softcam")
     self.ecminfo = GetEcmInfo()
     config.misc.softcams.value == ""
     Setup.__init__(self, session=session, setup="softcamscriptsetup")
     self["key_yellow"] = StaticText()
     self["key_blue"] = StaticText()
     self["restartActions"] = HelpableActionMap(
         self, ["ColorActions"], {
             "yellow":
             (self.restart, _("Immediately restart selected cams."))
         },
         prio=0,
         description=_("Softcam Actions"))
     self["restartActions"].setEnabled(False)
     self["infoActions"] = HelpableActionMap(
         self, ["ColorActions"],
         {"blue": (self.softcamInfo, _("Display oscam information."))},
         prio=0,
         description=_("Softcam Actions"))
     self["infoActions"].setEnabled(False)
     (newEcmFound, ecmInfo) = self.ecminfo.getEcm()
     self["info"] = ScrollLabel("".join(ecmInfo))
     self.EcmInfoPollTimer = eTimer()
     self.EcmInfoPollTimer.callback.append(self.setEcmInfo)
     self.EcmInfoPollTimer.start(1000)
     self.onShown.append(self.updateButtons)
Ejemplo n.º 6
0
	def __init__(self, session):
		self.buildChoices("TimeshiftPath", config.usage.timeshift_path, None)
		Setup.__init__(self, session=session, setup="timeshift")
		self.greenText = self["key_green"].text
		self.errorItem = -1
		if self.getCurrentItem() is config.usage.timeshift_path:
			self.pathStatus(self.getCurrentValue())
Ejemplo n.º 7
0
    def __init__(self,
                 session,
                 setup,
                 plugin=None,
                 menu_path=None,
                 PluginLanguageDomain=None):
        try:
            Setup.__init__(self, session, setup, plugin, menu_path,
                           PluginLanguageDomain)
        except TypeError:
            Setup.__init__(self, session, setup, plugin)

        self.skinName = ["ABMCustomMixImporterScreen", "Setup4buttons"]

        self["actions2"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"], {
                "ok": self.keySave,
                "cancel": self.keyCancel,
                "menu": self.keyCancel,
                "red": self.keyCancel,
                "green": self.keySave,
                "yellow": self.keyGo,
                "blue": self.keyDelete
            }, -2)

        self["key_red"] = StaticText(_("Exit"))
        self["key_green"] = StaticText(_("Save setup"))
        self["key_yellow"] = StaticText(_("Fetch file"))
        self["key_blue"] = StaticText()

        self.onLayoutFinish.append(self.updatebuttontext)
Ejemplo n.º 8
0
	def __init__(self, session):
		Setup.__init__(self, session=session, setup="Time")
		self.addSaveNotifier(self.updateNetworkTime)
		self["key_yellow"] = StaticText("")
		self["geolocationActions"] = HelpableActionMap(self, "ColorActions", {
			"yellow": (self.useGeolocation, _("Use geolocation to set the current time zone location"))
		}, prio=0, description=_("Time Setup Actions"))
		self.selectionChanged()
Ejemplo n.º 9
0
 def __init__(self, session, setupMode=True):
     if not InfoBar and not InfoBar.instance:
         self.close()
     self.setupMode = setupMode
     Setup.__init__(self, session=session, setup="SleepTimer")
     self.timer = eTimer()
     self.timer.callback.append(self.timeout)
     self.timer.start(250)
     self.onClose.append(self.clearTimer)
Ejemplo n.º 10
0
	def __init__(self, session):
		self["key_yellow"] = StaticText(_("Set fixed"))
		self["key_blue"] = StaticText(_("Clear fixed"))
		Setup.__init__(self, session=session, setup="hdmicec", plugin="SystemPlugins/HdmiCEC")
		self["actions"] = HelpableActionMap(self, ["ColorActions"],
		{
			"yellow": (self.setFixedAddress, _("Set HDMI-CEC fixed address")),
			"blue": (self.clearFixedAddress, _("Clear HDMI-CEC fixed address")),
		}, prio=-2, description=_("HDMI-CEC address editing actions"))

		self.updateAddress()
Ejemplo n.º 11
0
 def __init__(self, session):
     self.softcam = CamControl("softcam")
     self.cardserver = CamControl("cardserver")
     self.ecminfo = GetEcmInfo()
     restartOptions = [("", _("Don't restart")),
                       ("s", _("Restart softcam"))]
     defaultrestart = ""
     softcams = self.softcam.getList()
     defaultsoftcam = self.softcam.current()
     if len(softcams) > 1:
         defaultrestart = "s"
     else:
         softcams = [("", _("None"))]
         defaultsoftcam = ""
     config.misc.softcams = ConfigSelection(default=defaultsoftcam,
                                            choices=softcams)
     cardservers = self.cardserver.getList()
     defaultcardserver = self.cardserver.current()
     if len(cardservers) > 1:
         restartOptions.extend([("c", _("Restart cardserver")),
                                ("sc", _("Restart both"))])
         defaultrestart += "c"
     else:
         cardservers = [("", _("None"))]
         defaultcardserver = ""
     config.misc.cardservers = ConfigSelection(default=defaultcardserver,
                                               choices=cardservers)
     config.misc.restarts = ConfigSelection(default=defaultrestart,
                                            choices=restartOptions)
     Setup.__init__(self, session=session, setup="Softcam")
     self["key_yellow"] = StaticText()
     self["key_blue"] = StaticText()
     self["restartActions"] = HelpableActionMap(
         self, ["ColorActions"], {
             "yellow":
             (self.restart, _("Immediately restart selected devices."))
         },
         prio=0,
         description=_("Softcam Actions"))
     self["restartActions"].setEnabled(False)
     self["infoActions"] = HelpableActionMap(
         self, ["ColorActions"],
         {"blue": (self.softcamInfo, _("Display oscam information."))},
         prio=0,
         description=_("Softcam Actions"))
     self["infoActions"].setEnabled(False)
     (newEcmFound, ecmInfo) = self.ecminfo.getEcm()
     self["info"] = ScrollLabel("".join(ecmInfo))
     self.EcmInfoPollTimer = eTimer()
     self.EcmInfoPollTimer.callback.append(self.setEcmInfo)
     self.EcmInfoPollTimer.start(1000)
     self.onShown.append(self.updateButtons)
Ejemplo n.º 12
0
 def __init__(self, session):
     self.inhibitDevs = []
     for dir in defaultInhibitDirs + ["/", "/media"]:
         if isdir(dir):
             device = stat(dir).st_dev
             if device not in self.inhibitDevs:
                 self.inhibitDevs.append(device)
     self.buildChoices("TimeshiftPath", config.usage.timeshift_path, None)
     Setup.__init__(self, session=session, setup="timeshift")
     self.greenText = self["key_green"].text
     self.errorItem = -1
     if self.getCurrentItem() is config.usage.timeshift_path:
         self.pathStatus(self.getCurrentValue())
Ejemplo n.º 13
0
	def __init__(self, session):
		Setup.__init__(self, session=session, setup="HDMICEC")
		self.setTitle(_("HDMI-CEC Settings"))
		self["addressActions"] = HelpableActionMap(self, ["ColorActions"], {
			"yellow": (self.updateFixedAddress, _("Set current CEC address as fixed address"))
		}, prio=0, description=_("HDMI-CEC Setup Actions"))
		self["defaultActions"] = HelpableActionMap(self, ["ColorActions"], {
			"blue": (self.setDefaults, _("Reset HDMI-CEC settings to default"))
		}, prio=0, description=_("HDMI-CEC Setup Actions"))
		self["key_yellow"] = StaticText()
		self["key_blue"] = StaticText()
		self["current_address"] = StaticText()
		self["fixed_address"] = StaticText()
Ejemplo n.º 14
0
    def __init__(self, session):
        self.list = []
        self.config = []
        # Summary
        from Plugins.Extensions.InfoBarTunerState.plugin import NAME, VERSION
        self.setup_title = NAME + " " + _("Configuration") + " " + VERSION

        self.defineConfig()
        Setup.__init__(self,
                       session,
                       "InfoBarTunerState",
                       plugin="Extensions/InfoBarTunerState",
                       PluginLanguageDomain="InfoBarTunerState")
Ejemplo n.º 15
0
	def __init__(self, session, setup, plugin=None):
		Setup.__init__(self, session, setup, plugin)
		self.skinName = "AtemioBackupManagerMenu"

		self["actions2"] = ActionMap(["SetupActions", 'ColorActions', 'VirtualKeyboardActions', "MenuActions"],
									 {
									 "yellow": self.chooseFiles,
									 "blue": self.chooseXtraPluginDir,
									 }, -2)

		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))
		self["key_yellow"] = Button(_("Choose Files"))
		self["key_blue"] = Button(_("Choose local ipk's folder"))
Ejemplo n.º 16
0
 def __init__(self, session):
     self.styles = [("<default>", _("<Default movie location>")),
                    ("<current>", _("<Current movielist location>")),
                    ("<timer>", _("<Last timer location>"))]
     self.styleKeys = [x[0] for x in self.styles]
     self.buildChoices("DefaultPath", config.usage.default_path, None)
     self.buildChoices("TimerPath", config.usage.timer_path, None)
     self.buildChoices("InstantPath", config.usage.instantrec_path, None)
     Setup.__init__(self, session=session, setup="recording")
     self.greenText = self["key_green"].text
     self.errorItem = -1
     if self.getCurrentItem() in (config.usage.default_path,
                                  config.usage.timer_path,
                                  config.usage.instantrec_path):
         self.pathStatus(self.getCurrentValue())
Ejemplo n.º 17
0
 def __init__(self, session):
     self.resetFull = ConfigYesNo(default=True)
     self.resetBouquets = ConfigYesNo(default=True)
     self.resetKeymaps = ConfigYesNo(default=True)
     self.resetNetworks = ConfigYesNo(default=True)
     self.resetPlugins = ConfigYesNo(default=True)
     self.resetResumePoints = ConfigYesNo(default=True)
     self.resetSettings = ConfigYesNo(default=True)
     self.resetSkins = ConfigYesNo(default=True)
     self.resetTimers = ConfigYesNo(default=True)
     self.resetOthers = ConfigYesNo(default=True)
     Setup.__init__(self, session=session, setup="FactoryReset")
     self["key_green"].text = _("Reset")
     ProtectedScreen.__init__(self)
     self.setTitle(_("Factory Reset"))
Ejemplo n.º 18
0
	def __init__(self, session):
		self.styles = [("<default>", _("<Default movie location>")), ("<current>", _("<Current movielist location>")), ("<timer>", _("<Last timer location>"))]
		self.styleKeys = [x[0] for x in self.styles]
		self.inhibitDevs = []
		for dir in defaultInhibitDirs + ["/", "/media"]:
			if isdir(dir):
				device = stat(dir).st_dev
				if device not in self.inhibitDevs:
					self.inhibitDevs.append(device)
		self.buildChoices("DefaultPath", config.usage.default_path, None)
		self.buildChoices("TimerPath", config.usage.timer_path, None)
		self.buildChoices("InstantPath", config.usage.instantrec_path, None)
		Setup.__init__(self, session=session, setup="Recording")
		self.greenText = self["key_green"].text
		self.errorItem = -1
		if self.getCurrentItem() in (config.usage.default_path, config.usage.timer_path, config.usage.instantrec_path):
			self.pathStatus(self.getCurrentValue())
Ejemplo n.º 19
0
 def __init__(self, session, PluginLanguageDomain=None):
     Setup.__init__(self,
                    session=session,
                    setup="time",
                    plugin=None,
                    PluginLanguageDomain=PluginLanguageDomain)
     self["key_yellow"] = StaticText("")
     self["geolocationActions"] = HelpableActionMap(
         self,
         "ColorActions", {
             "yellow":
             (self.useGeolocation,
              _("Use geolocation to set the current time zone location"))
         },
         prio=0,
         description=_("Time Setup Actions"))
     self.selectionChanged()
Ejemplo n.º 20
0
 def __init__(self, session):
     self.configDir = resolveFilename(SCOPE_CONFIG)
     config.factory = ConfigSubsection()
     config.factory.resetFull = NoSave(ConfigYesNo(default=True))
     config.factory.resetNetwork = NoSave(ConfigYesNo(default=True))
     config.factory.resetBouquets = NoSave(ConfigYesNo(default=True))
     config.factory.resetUserInterfaces = NoSave(ConfigYesNo(default=True))
     config.factory.resetMounts = NoSave(ConfigYesNo(default=True))
     config.factory.resetPlugins = NoSave(ConfigYesNo(default=True))
     config.factory.resetResumePoints = NoSave(ConfigYesNo(default=True))
     config.factory.resetSettings = NoSave(ConfigYesNo(default=True))
     config.factory.resetSkins = NoSave(ConfigYesNo(default=True))
     config.factory.resetTimers = NoSave(ConfigYesNo(default=True))
     config.factory.resetOthers = NoSave(ConfigYesNo(default=True))
     Setup.__init__(self, session=session, setup="FactoryReset")
     ProtectedScreen.__init__(self)
     self["key_green"].text = _("Reset")
Ejemplo n.º 21
0
 def __init__(self, session):
     self.serviceVolumeOffsets = VolumeInstance.getServiceVolumeOffsets()
     self.initialVolumeOffsets = deepcopy(self.serviceVolumeOffsets)
     Setup.__init__(self, session, setup="VolumeAdjust")
     self["key_yellow"] = StaticText("")
     self["key_blue"] = StaticText("")
     self["addServiceActions"] = HelpableActionMap(
         self, ["VolumeAdjustActions"], {
             "addService": (self.addService,
                            _("Add a service to the Volume Offsets list"))
         },
         prio=0,
         description=_("Volume Adjust Actions"))
     self["addCurrentActions"] = HelpableActionMap(
         self, ["VolumeAdjustActions"], {
             "addCurrentService":
             (self.addCurrentService,
              _("Add the current service to the Volume Offsets list"))
         },
         prio=0,
         description=_("Volume Adjust Actions"))
     self["addCurrentActions"].setEnabled(False)
     self["deleteActions"] = HelpableActionMap(self, [
         "VolumeAdjustActions"
     ], {
         "deleteService":
         (self.deleteService,
          _("Delete the currently highlighted service from the Volume Offsets list"
            ))
     },
                                               prio=0,
                                               description=_(
                                                   "Volume Adjust Actions"))
     self["deleteActions"].setEnabled(False)
     serviceRef = self.session.nav.getCurrentlyPlayingServiceReference()
     if serviceRef:
         self.serviceName = ServiceReference(
             serviceRef).getServiceName().replace("\xc2\x87", "").replace(
                 "\xc2\x86", "")
         self.serviceReference = serviceRef.toCompareString()
     else:
         self.serviceName = None
         self.serviceReference = None
     self.volumeControl = eDVBVolumecontrol.getInstance()
     self.serviceVolume = self.volumeControl.getVolume()
     self.normalVolume = VolumeInstance.getNormalVolume()
Ejemplo n.º 22
0
    def __init__(self, session, device):
        self.device = device
        inputDevices.currentDevice = self.device
        configItem = getattr(config.inputDevices, device)
        self.enableEntry = getConfigListEntry(
            self.formatItemText(_("Change repeat and delay settings?")),
            configItem.enabled,
            self.formatItemDescription(
                configItem.enabled,
                _("Select 'Yes' to enable editing of this device's settings. Selecting 'No' resets the devices settings to their default values."
                  )))
        self.nameEntry = getConfigListEntry(
            self.formatItemText(_("Devicename:")), configItem.name,
            self.formatItemDescription(configItem.name,
                                       _("Enter a new name for this device.")))
        self.delayEntry = getConfigListEntry(
            self.formatItemText(_("Delay before key repeat starts:")),
            configItem.delay,
            self.formatItemDescription(
                configItem.delay,
                _("Select the time delay before the button starts repeating.")
            ))
        self.repeatEntry = getConfigListEntry(
            self.formatItemText(_("Interval between keys when repeating:")),
            configItem.repeat,
            self.formatItemDescription(
                configItem.repeat,
                _("Select the time delay between each repeat of the button.")))
        Setup.__init__(self, session, "InputDeviceSetup")
        self.setTitle(_("Setup InputDevice"))
        #		self.skinName.insert(0, "InputDeviceDriverSetup")
        self.onClose.append(self.cleanup)

        # for generating strings into .po only
        devicenames = [
            _("%s %s front panel") % (getMachineBrand(), getMachineName()),
            _("%s %s front panel") % (getMachineBrand(), getMachineName()),
            _("%s %s remote control (native)") %
            (getMachineBrand(), getMachineName()),
            _("%s %s advanced remote control (native)") %
            (getMachineBrand(), getMachineName()),
            _("%s %s ir keyboard") % (getMachineBrand(), getMachineName()),
            _("%s %s ir mouse") % (getMachineBrand(), getMachineName())
        ]
Ejemplo n.º 23
0
	def __init__(self, session, setup, plugin=None, menu_path=None, PluginLanguageDomain=None):
		try:
			Setup.__init__(self, session, setup, plugin, menu_path, PluginLanguageDomain)
		except TypeError:
			Setup.__init__(self, session, setup, plugin)

		self["actions2"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"],
		{
			"ok": self.keySave,
			"cancel": self.keyCancel,
			"menu": self.keyCancel,
			"red": self.keyCancel,
			"green": self.keySave,
			"yellow": self.keyGo,
		}, -2)

		self["key_red"] = StaticText(_("Exit"))
		self["key_green"] = StaticText(_("Save"))
		self["key_yellow"] = StaticText(_("Import"))
Ejemplo n.º 24
0
 def __init__(self, session):
     nChoices = updateOrbposConfig(save=True)
     if nChoices <= 2:
         config.plugins.epgsearch.enableorbpos.value = False
     self.allowShowOrbital = allowShowOrbital
     Setup.__init__(self,
                    session,
                    "epgsearch",
                    plugin="Extensions/EPGSearch",
                    PluginLanguageDomain="EPGSearch")
     self.setTitle(_("EPGSearch Setup"))
     self.notifiers = (
         config.plugins.epgsearch.scope,
         config.plugins.epgsearch.enableorbpos,
         config.plugins.epgsearch.invertorbpos,
         config.plugins.epgsearch.numorbpos,
     )
     self.onClose.append(self.clearNotifiers)
     self.updateConfig()
     self.addNotifiers()
Ejemplo n.º 25
0
	def __init__(self, session):
		Setup.__init__(self, session, "filecommander", plugin="Extensions/FileCommander")
Ejemplo n.º 26
0
 def __init__(self, session):
     Setup.__init__(self, session, "PluginFilter")
     self.setTitle(_("Plugin Filter Settings"))
Ejemplo n.º 27
0
	def __init__(self, session):
		Setup.__init__(self, session, setup="opentvzapper", plugin="SystemPlugins/OpentvZapper")
Ejemplo n.º 28
0
 def __init__(self, session):
     self.rctype = None
     self.defaultRcType = 0
     self.getDefaultRcType()
     Setup.__init__(self, session, None)
     self.setTitle(_("Setup InputDevice"))
Ejemplo n.º 29
0
 def __init__(self, session):
     Setup.__init__(self, session, "vps", plugin="SystemPlugins/vps")
Ejemplo n.º 30
0
 def __init__(self, session):
     Setup.__init__(self, session=session, setup="Locale")
Ejemplo n.º 31
0
 def __init__(self, session):
     Setup.__init__(self, session, "InputDevices")
     self.initialKeyboardMap = config.inputDevices.keyboardMap.value
     self.initialRemotesIndex = config.inputDevices.remotesIndex.value
Ejemplo n.º 32
0
Archivo: ui.py Proyecto: wedebe/enigma2
 def __init__(self, session):
     Setup.__init__(self,
                    session,
                    setup="PicturePlayer",
                    plugin="Extensions/PicturePlayer")
     self.setTitle(_("Edit settings"))
Ejemplo n.º 33
0
 def __init__(self, session):
     Setup.__init__(self,
                    session,
                    "fcc",
                    plugin="SystemPlugins/FastChannelChange")