Esempio n. 1
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)
Esempio n. 2
0
 def createSetup(self):
     self.list = []
     Setup.createSetup(self)
     volumeList = self["config"].getList()
     self.volumeStart = len(volumeList)
     if self.serviceVolumeOffsets:
         volumeList.append(
             getConfigListEntry(_("Currently Defined Volume Offsets:")))
         for serviceVolumeOffset in self.serviceVolumeOffsets:
             default = config.volume.defaultOffset.value if serviceVolumeOffset[
                 2] == NEW_VALUE else serviceVolumeOffset[2]
             entry = NoSave(
                 ConfigSelectionNumber(min=OFFSET_MIN,
                                       max=OFFSET_MAX,
                                       stepwidth=1,
                                       default=default,
                                       wraparound=False))
             if serviceVolumeOffset[2] == NEW_VALUE:
                 serviceVolumeOffset[2] = config.volume.defaultOffset.value
                 entry.default = NEW_VALUE  # This triggers a cancel confirmation for unedited new entries.
             volumeList.append(
                 getConfigListEntry(
                     "  -  %s" % serviceVolumeOffset[0], entry,
                     _("Set the volume offset for the '%s' service.") %
                     serviceVolumeOffset[0]))
     self["config"].setList(volumeList)
Esempio n. 3
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)
Esempio 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["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"))
Esempio n. 5
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())
Esempio n. 6
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)
Esempio 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)
Esempio n. 8
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")
Esempio n. 9
0
 def keySelect(self):
     if self["config"].getCurrent()[1] == config.mediaplayer.defaultDir:
         self.session.openWithCallback(
             self.DirectoryBrowserClosed, DirectoryBrowser,
             self.parent.filelist.getCurrentDirectory())
         return
     Setup.keySelect(self)
Esempio n. 10
0
	def keySelect(self):
		item = self.getCurrentItem()
		if item in (config.usage.default_path, config.usage.timer_path, config.usage.instantrec_path):
			# print("[Recordings] DEBUG: '%s', '%s', '%s'." % (self.getCurrentEntry(), item.value, preferredPath(item.value)))
			self.session.openWithCallback(self.pathSelect, MovieLocationBox, self.getCurrentEntry(), preferredPath(item.value))
		else:
			Setup.keySelect(self)
Esempio n. 11
0
 def keySave(self):
     sleepTimer = config.usage.sleepTimer.value
     if sleepTimer == -1:
         sleepTimer = 0  # Default sleep timer if the event end time can't be determined, default is the sleep timer is disabled.
         ref = self.session.nav.getCurrentlyPlayingServiceOrGroup()
         if ref:
             path = ref.getPath()
             if path:  # Movie
                 service = self.session.nav.getCurrentService()
                 seek = service and service.seek()
                 if seek:
                     length = seek.getLength()
                     position = seek.getPlayPosition()
                     if length and position:
                         sleepTimer = length[1] - position[1]
                         if sleepTimer > 0:
                             sleepTimer = int(sleepTimer // 90000)
             else:  # Service
                 epg = eEPGCache.getInstance()
                 event = epg.lookupEventTime(ref, -1, 0)
                 if event:
                     sleepTimer = event.getBeginTime() + event.getDuration(
                     ) - int(time())
             sleepTimer += (config.recording.margin_after.value * 60)
     InfoBar.instance.setSleepTimer(sleepTimer)
     InfoBar.instance.setEnergyTimer(config.usage.energyTimer.value)
     Setup.keySave(self)
Esempio n. 12
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()
Esempio n. 13
0
	def selectionChanged(self):
		if Setup.getCurrentItem(self) in (config.timezone.area, config.timezone.val):
			self["key_yellow"].setText(_("Use Geolocation"))
			self["geolocationActions"].setEnabled(True)
		else:
			self["key_yellow"].setText("")
			self["geolocationActions"].setEnabled(False)
		Setup.selectionChanged(self)
Esempio n. 14
0
 def dofinish(self):
     self.activityTimer.stop()
     del self.activityTimer
     if self.mbox:
         self.mbox.close()
     self.session.nav.playService(self.oldref, adjust=False)
     if self.camtype == "None" or "e" in self.camtype:
         Setup.keySave(self)
Esempio n. 15
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)
Esempio n. 16
0
 def keySave(self):
     if self.errorItem == -1:
         Setup.keySave(self)
     else:
         self.session.open(MessageBox,
                           "%s\n\n%s" %
                           (self.getFootnote(),
                            _("Please select an acceptable directory.")),
                           type=MessageBox.TYPE_ERROR)
Esempio n. 17
0
 def cancelConfirm(self, result):
     if not result:
         return
     VolumeInstance.setServiceVolumeOffsets(self.initialVolumeOffsets)
     if self.volumeControl.getVolume(
     ) != self.serviceVolume:  # Reset the offset if we were setting an offset for the current service.
         self.volumeControl.setVolume(
             self.serviceVolume,
             self.serviceVolume)  # Volume left, volume right.
     Setup.cancelConfirm(self, result)
Esempio n. 18
0
	def keySave(self):
		device = ""
		if hasattr(self, "cardservers") and (config.misc.cardservers.value != self.cardserver.current()):
			device = "sc"
		elif config.misc.softcams.value != self.softcam.current():
			device = "s"
		if device:
			self.restart(device="e%s" % device)
		else:
			Setup.keySave(self)
Esempio n. 19
0
    def keySave(self):
        purgeOrbposConfig()
        if not config.plugins.epgsearch.showinplugins.value:
            for plugin in plugins.getPlugins(
                    PluginDescriptor.WHERE_PLUGINMENU):
                if plugin.name == _("EPGSearch"):
                    plugins.removePlugin(plugin)

        plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
        Setup.keySave(self)
Esempio n. 20
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()
Esempio n. 21
0
 def keySave(self):
     camtype = ""
     print(
         "[SoftcamSetup][keySave] self.softcam.current=%s config.misc.softcams.value=%s"
         % (self.softcam.current(), config.misc.softcams.value))
     if config.misc.softcams.value != self.softcam.current():
         camtype = "s"
     if camtype:
         self.restart(camtype="e%s" % camtype)
     else:
         Setup.keySave(self)
Esempio n. 22
0
	def selectionChanged(self):
		if self.getCurrentItem() == config.hdmicec.enabled:
			if config.hdmicec.enabled.value:
				self.updateAddress()
			else:
				self["key_yellow"].setText("")
				self["current_address"].setText("")
				self["fixed_address"].setText("")
			self["addressActions"].setEnabled(config.hdmicec.enabled.value)
			self["key_blue"].setText(_("Use defaults") if config.hdmicec.enabled.value else "")
			self["defaultActions"].setEnabled(config.hdmicec.enabled.value)
		Setup.selectionChanged(self)
Esempio n. 23
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)
Esempio n. 24
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())
Esempio n. 25
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()
Esempio n. 26
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")
Esempio n. 27
0
 def doStart(self):
     self.activityTimer.stop()
     del self.activityTimer
     if "s" in self.device:
         self.softcam.select(config.misc.softcams.value)
         self.softcam.command("start")
     if "c" in self.device:
         self.cardserver.select(config.misc.cardservers.value)
         self.cardserver.command("start")
     if self.mbox:
         self.mbox.close()
     self.session.nav.playService(self.oldref, adjust=False)
     if "e" in self.device:
         Setup.keySave(self)
Esempio n. 28
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"))
Esempio n. 29
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())
Esempio n. 30
0
 def changedEntry(self):
     if self.getCurrentItem() in (config.plugins.fccsetup.zapupdown,
                                  config.plugins.fccsetup.history.value):
         if not (config.plugins.fccsetup.zapupdown.value
                 or config.plugins.fccsetup.history.value):
             if self.getCurrentItem() == config.plugins.fccsetup.history:
                 config.plugins.fccsetup.zapupdown.value = True
             else:
                 config.plugins.fccsetup.history.value = True
         elif (config.plugins.fccsetup.zapupdown.value
               and config.plugins.fccsetup.history.value):
             if int(config.plugins.fccsetup.maxfcc.value) < 5:
                 config.plugins.fccsetup.maxfcc.value = str(
                     max_fcc if max_fcc < 5 else 5)
     Setup.changedEntry(self)
Esempio n. 31
0
 def selectionChanged(self):
     Setup.selectionChanged(self)
     if self.findCurrentService(self.serviceName,
                                self.serviceReference) == -1:
         self["addCurrentActions"].setEnabled(True)
         self["key_yellow"].setText(_("Add Current"))
     else:
         self["addCurrentActions"].setEnabled(False)
         self["key_yellow"].setText("")
     if self["config"].getCurrentIndex() > self.volumeStart:
         self["deleteActions"].setEnabled(True)
         self["key_blue"].setText(_("Delete"))
     else:
         self["deleteActions"].setEnabled(False)
         self["key_blue"].setText("")
 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"))
Esempio n. 33
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"))