Example #1
0
 def __init__(self, session):
     Screen.__init__(self, session)
     Screen.setTitle(self, _("Swap Manager"))
     self["lab1"] = Label()
     self["autostart_on"] = Pixmap()
     self["autostart_off"] = Pixmap()
     self["lab2"] = Label(_("Swap Place:"))
     self["labplace"] = Label()
     self["lab3"] = Label(_("Swap Size:"))
     self["labsize"] = Label()
     self["lab4"] = Label(_("Status:"))
     self["inactive"] = Label(_("Inactive"))
     self["active"] = Label(_("Active"))
     self["key_red"] = Label(_("Activate"))
     self["key_green"] = Label(_("Create"))
     self["key_yellow"] = Label(_("Autostart"))
     self["swapname_summary"] = StaticText()
     self["swapactive_summary"] = StaticText()
     self.Console = Console()
     self.swap_place = ""
     self.new_place = ""
     self.creatingswap = False
     self["actions"] = ActionMap(
         ["WizardActions", "ColorActions", "MenuActions"],
         {
             "back": self.close,
             "red": self.actDeact,
             "green": self.createDel,
             "yellow": self.autoSsWap,
             "menu": self.close,
         },
     )
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.getSwapDevice)
     self.updateSwap()
Example #2
0
    def __init__(
        self,
        session,
        scanTuner=0,
        transponderParameters=None,
        scanPid=900,
        keepNumbers=False,
        keepSettings=False,
        providerName="Favorites",
    ):
        Screen.__init__(self, session)
        self.scanPid = scanPid
        self.scanTuner = scanTuner
        self.transponderParameters = transponderParameters
        self.keepNumbers = keepNumbers
        self.keepSettings = keepSettings
        self.providerName = providerName

        self["frontend"] = Pixmap()
        self["scan_progress"] = ProgressBar()
        self["scan_state"] = Label(_("scan state"))

        self.prevservice = self.session.nav.getCurrentlyPlayingServiceReference()
        self.session.nav.stopService()

        self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.ok, "cancel": self.cancel})

        self.onFirstExecBegin.append(self.doServiceScan)
Example #3
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("HDMI CEC Setup"))

        from Components.ActionMap import ActionMap
        from Components.Button import Button

        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("Set fixed"))
        self["key_blue"] = StaticText(_("Clear fixed"))
        self["current_address"] = StaticText()
        self["fixed_address"] = StaticText()

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"],
            {
                "ok": self.keyGo,
                "save": self.keyGo,
                "cancel": self.keyCancel,
                "green": self.keyGo,
                "red": self.keyCancel,
                "yellow": self.setFixedAddress,
                "blue": self.clearFixedAddress,
                "menu": self.closeRecursive,
            },
            -2,
        )

        self.onChangedEntry = []
        self.list = []
        ConfigListScreen.__init__(self, self.list, session=self.session, on_change=self.changedEntry)
        self.createSetup()
Example #4
0
    def __init__(self, session):
        desktop = getDesktop(0)
        size = desktop.size()
        self.sc_width = size.width()
        self.sc_height = size.height()

        statusPositionX = 50
        statusPositionY = 100
        self.delayTimer = eTimer()
        self.delayTimer.callback.append(self.hideStatus)
        self.delayTimerDelay = 1500

        self.skin = """
            <screen name="StatusScreen" position="%s,%s" size="%s,90" zPosition="0" backgroundColor="transparent" flags="wfNoBorder">
                    <widget name="status" position="0,0" size="%s,70" valign="center" halign="left" font="Regular;22" transparent="1" foregroundColor="yellow" shadowColor="#40101010" shadowOffset="3,3" />
            </screen>""" % (
            str(statusPositionX),
            str(statusPositionY),
            str(self.sc_width),
            str(self.sc_width),
        )

        Screen.__init__(self, session)
        self.stand_alone = True
        self["status"] = Label("")
        self.onClose.append(self.__onClose)
Example #5
0
    def __init__(self, session, message="", title="", menulist=[], type=0, exitid=-1, default=0, timeout=0):
        # type exist for compability... will be ignored
        Screen.__init__(self, session)
        self.session = session
        self.ctitle = title
        self.exitid = exitid
        self.default = default
        self.timeout = timeout
        self.elapsed = 0

        self.list = []
        for item in menulist:
            self.list.append(MessageBoxEntry(item[0], item[1]))

        self["menu"] = List(self.list)
        self["menu"].onSelectionChanged.append(self.selectionChanged)

        self["message"] = Label(message)
        self["actions"] = ActionMap(["SetupActions"], {"ok": self.ok, "cancel": self.cancel}, -2)

        self.onLayoutFinish.append(self.layoutFinished)

        self.timer = eTimer()
        self.timer.callback.append(self.timeoutStep)
        if self.timeout > 0:
            self.timer.start(1000, 1)
Example #6
0
    def __init__(self, session):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)

        self["key_red"] = StaticText(_("Exit"))
        self["key_green"] = StaticText(_("Global"))
        self["key_yellow"] = StaticText(_("Mouse"))
        self["key_blue"] = StaticText(_("Keyboard"))

        self["actions"] = ActionMap(
            ["DirectionActions", "OkCancelActions", "ColorActions"],
            {
                "ok": self.keyRed,
                "cancel": self.keyRed,
                "red": self.keyRed,
                "green": self.keyGreen,
                "yellow": self.keyYellow,
                "blue": self.keyBlue,
            },
            -2,
        )

        self.showHelpTimer = eTimer()
        self.showHelpTimer.callback.append(self.cbShowHelpTimerClosed)
        self.showHelpTimer.start(500)

        self.onLayoutFinish.append(self.layoutFinished)
Example #7
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.skin = KTglob.SKIN

        self.skin_path = KTglob.plugin_path

        self["TimerGraph"] = KTmultiPixmap()
        self["TimerText"] = Label(_("01:00"))
        self["TimerSlider"] = ProgressBar()
        self["TimerSliderText"] = Label(_("01:00"))

        if config.plugins.KiddyTimer.timerStyle.value == "clock":
            self["TimerGraph"].show()
            self["TimerText"].show()
            self["TimerSlider"].hide()
            self["TimerSliderText"].hide()
        else:
            self["TimerGraph"].hide()
            self["TimerText"].hide()
            self["TimerSlider"].show()
            self["TimerSliderText"].show()

        self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.keyOK, "cancel": self.keyCancel}, -1)

        MovableScreen.__init__(self, config.plugins.KiddyTimer, [], 82, 82)
        self.startMoving()
Example #8
0
 def __init__(self, session, userSatlist=[]):
     Screen.__init__(self, session)
     self["key_red"] = Button(_("Cancel"))
     self["key_green"] = Button(_("Save"))
     self["key_yellow"] = Button(_("Sort by"))
     self["key_blue"] = Button(_("Select all"))
     self["hint"] = Label(_("Press OK to toggle the selection"))
     SatList = []
     for sat in nimmanager.getSatList():
         selected = False
         if isinstance(userSatlist, str) and str(sat[0]) in userSatlist:
             selected = True
         SatList.append((sat[0], sat[1], sat[2], selected))
     sat_list = [SelectionEntryComponent(x[1], x[0], x[2], x[3]) for x in SatList]
     self["list"] = SelectionList(sat_list, enableWrapAround=True)
     self["setupActions"] = ActionMap(
         ["SetupActions", "ColorActions"],
         {
             "red": self.cancel,
             "green": self.save,
             "yellow": self.sortBy,
             "blue": self["list"].toggleAllSelection,
             "save": self.save,
             "cancel": self.cancel,
             "ok": self["list"].toggleSelection,
         },
         -2,
     )
     self.setTitle(_("Select satellites"))
Example #9
0
 def __init__(self, session, currentLanguage):
     Screen.__init__(self, session)
     self.oldActiveLanguage = currentLanguage
     self["languages"] = List([])
     self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.save, "cancel": self.cancel}, -1)
     self.updateList()
     self.onLayoutFinish.append(self.selectActiveLanguage)
Example #10
0
    def __init__(self, session, slotid):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Tuner settings"))
        self.list = []
        ServiceStopScreen.__init__(self)
        self.stopService()
        ConfigListScreen.__init__(self, self.list)

        self["key_red"] = Label(_("Close"))
        self["key_green"] = Label(_("Save"))
        self["key_yellow"] = Label(_("Configuration mode"))
        self["key_blue"] = Label()

        self["actions"] = ActionMap(
            ["SetupActions", "SatlistShortcutAction", "ColorActions"],
            {
                "ok": self.keyOk,
                "save": self.keySave,
                "cancel": self.keyCancel,
                "changetype": self.changeConfigurationMode,
                "nothingconnected": self.nothingConnectedShortcut,
                "red": self.keyCancel,
                "green": self.keySave,
            },
            -2,
        )

        self.slotid = slotid
        self.nim = nimmanager.nim_slots[slotid]
        self.nimConfig = self.nim.config
        self.createConfigMode()
        self.createSetup()
        self.onLayoutFinish.append(self.layoutFinished)
Example #11
0
    def __init__(self, session):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Tuner configuration"))

        self.list = [None] * nimmanager.getSlotCount()
        self["nimlist"] = List(self.list)
        self.updateList()

        self.setResultClass()

        self["key_red"] = StaticText(_("Close"))
        self["key_green"] = StaticText(_("Select"))

        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions", "MenuActions"],
            {
                "ok": self.okbuttonClick,
                "cancel": self.close,
                "red": self.close,
                "green": self.okbuttonClick,
                "menu": self.exit,
            },
            -2,
        )
        self.setTitle(_("Choose Tuner"))
    def __init__(self, session):
        if getDesktop(0).size().width() < 800:
            skin = "%s/skins/providers_sd.xml" % os.path.dirname(sys.modules[__name__].__file__)
        else:
            skin = "%s/skins/providers_hd.xml" % os.path.dirname(sys.modules[__name__].__file__)
        f = open(skin, "r")
        self.skin = f.read()
        f.close()
        Screen.__init__(self, session)

        self.config = CrossEPG_Config()
        self.config.load()
        self.providers = self.config.getAllProviders()
        self.list = []

        self["list"] = List(self.list)
        self["list"].onSelectionChanged.append(self.selectionChanged)
        self["key_red"] = Button(_("Back"))
        self["key_green"] = Button("")
        self["key_yellow"] = Button("")
        self["key_blue"] = Button("")
        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions"],
            {"red": self.quit, "cancel": self.quit, "green": self.moveUp, "yellow": self.moveDown},
            -2,
        )

        self.buildList()
        self.onFirstExecBegin.append(self.setCustomTitle)
        self.onFirstExecBegin.append(self.selectionChanged)
Example #13
0
 def __init__(self, session, entry, configPSR):
     self.session = session
     Screen.__init__(self, session)
     self.title = _("PipServiceRelation - Entry Config")
     self["actions"] = ActionMap(
         ["SetupActions", "ColorActions"],
         {"green": self.keySave, "red": self.keyCancel, "cancel": self.keyCancel, "ok": self.keySelect},
         -2,
     )
     self["key_red"] = StaticText(_("Cancel"))
     self["key_green"] = StaticText(_("OK"))
     self.configPSR = configPSR
     self.entry = entry
     if entry is None:
         self.currentKey = None
         self.ref1 = NoSave(ConfigDirectory(default=_("Press OK to select a service")))
         self.ref2 = NoSave(ConfigDirectory(default=_("Press OK to select a related PiP service")))
     else:
         self.currentKey = entry[0]
         self.ref1 = NoSave(ConfigDirectory(default=ServiceReference(eServiceReference(entry[0])).getServiceName()))
         self.ref2 = NoSave(ConfigDirectory(default=ServiceReference(eServiceReference(entry[1])).getServiceName()))
     self.list = []
     self.serviceref1 = getConfigListEntry(_("Service"), self.ref1)
     self.serviceref2 = getConfigListEntry(_("Related Pip Service"), self.ref2)
     self.list.append(self.serviceref1)
     self.list.append(self.serviceref2)
     ConfigListScreen.__init__(self, self.list, session)
    def __init__(self, session, device, partition):
        Screen.__init__(self, session)

        self.device = device
        self.partition = partition
        self.mountpoints = MountPoints()
        self.mountpoints.read()
        self.fast = False

        self.list = []
        self.list.append("Mount as main hdd")
        self.list.append("Mount as /media/usb")
        self.list.append("Mount as /media/usb1")
        self.list.append("Mount as /media/usb2")
        self.list.append("Mount as /media/usb3")
        self.list.append("Mount as /media/cf")
        self.list.append("Mount as /media/mmc1")
        self.list.append("Mount on custom path")

        self["menu"] = MenuList(self.list)

        self["key_red"] = Button(_("Fixed mount"))
        self["key_green"] = Button("Fast mount")
        self["key_blue"] = Button(_("Exit"))
        # self["key_yellow"] = Button("")
        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"],
            {"blue": self.quit, "green": self.green, "ok": self.ok, "red": self.ok, "cancel": self.quit},
            -2,
        )
Example #15
0
    def __init__(self, session, _mode, _type, _data, _bm):
        self.mMode = _mode
        self.mType = _type
        self.mData = _data
        self.mSession = session
        self.mBookmarkManager = _bm

        if _data is not None:
            vbcfg.DEBUG("0x%x" % _data.mId)

        Screen.__init__(self, session)

        self.menulist = []
        ConfigListScreen.__init__(self, self.menulist)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"],
            {"ok": self.keyGreen, "green": self.keyGreen, "red": self.keyRed, "cancel": self.keyRed},
            -2,
        )

        self["VKeyIcon"] = Pixmap()
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("Save"))

        self.menuItemTitle = None
        self.menuItemUrl = None
        self.menuItemName = None

        self.menuEntryName = None
        self.menuEntryTitle = None
        self.menuEntryUrl = None

        self.makeConfigList()
        self.onLayoutFinish.append(self.layoutFinished)
Example #16
0
    def __init__(self, session, retvalue=1):
        self.skin = """<screen name="QuitMainloopScreen" position="fill" flags="wfNoBorder">
			<ePixmap pixmap="icons/input_info.png" position="c-27,c-60" size="53,53" alphatest="on" />
			<widget name="text" position="center,c+5" size="720,100" font="Regular;22" halign="center" />
		</screen>"""
        Screen.__init__(self, session)
        from Components.Label import Label

        text = {
            1: _("Your %s %s is shutting down") % (getMachineBrand(), getMachineName()),
            2: _("Your %s %s is rebooting") % (getMachineBrand(), getMachineName()),
            3: _("The user interface of your %s %s is restarting") % (getMachineBrand(), getMachineName()),
            4: _(
                "Your frontprocessor will be upgraded\nPlease wait until your %s %s reboots\nThis may take a few minutes"
            )
            % (getMachineBrand(), getMachineName()),
            5: _("The user interface of your %s %s is restarting\ndue to an error in mytest.py")
            % (getMachineBrand(), getMachineName()),
            42: _("Upgrade in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes")
            % (getMachineBrand(), getMachineName()),
            43: _("Reflash in progress\nPlease wait until your %s %s reboots\nThis may take a few minutes")
            % (getMachineBrand(), getMachineName()),
            44: _("Your front panel will be upgraded\nThis may take a few minutes"),
            45: _("Your %s %s goes to WOL") % (getMachineBrand(), getMachineName()),
        }.get(retvalue)
        self["text"] = Label(text)
Example #17
0
    def __init__(self, _session, _url=None, _title=None):
        self.mUrl = _url
        self.mTitle = _title
        self.mBookmarkManager = BookmarkManager.getInstance()
        self.mSession = _session
        Screen.__init__(self, _session)
        self["actions"] = ActionMap(
            ["DirectionActions", "OkCancelActions", "ColorActions", "NumberActions"],
            {
                "ok": self.keyOK,
                "cancel": self.keyCancel,
                "red": self.keyRed,
                "green": self.keyGreen,
                "yellow": self.keyYellow,
                "blue": self.keyBlue,
                "0": self.keyNumber,
            },
            -2,
        )

        self["key_red"] = StaticText(_("Exit"))
        self["key_green"] = StaticText(_("Add"))
        self["key_yellow"] = StaticText(_("Edit"))
        self["key_blue"] = StaticText(_("Delete"))
        self["key_0"] = StaticText(_("Set as Startpage"))

        self.mBookmarkList = self.setBookmarkList()
        self["bookmarklist"] = MenuList(self.mBookmarkList)

        self.onLayoutFinish.append(self.layoutFinished)
Example #18
0
    def __init__(self, session, online):
        Screen.__init__(self, session)
        self.session = session

        Screen.setTitle(self, _("Flash On the fly (select a image)"))
        self["key_green"] = Button(_("Flash"))
        self["key_red"] = Button(_("Exit"))
        self["key_blue"] = Button("")
        self["key_yellow"] = Button("")
        self.filename = None
        self.imagelist = []
        self.simulate = False
        self.Online = online
        self.imagePath = imagePath
        self.feedurl = feedurl_atv
        if image == 0:
            self.feed = "atv"
        else:
            self.feed = "om"
        self["imageList"] = MenuList(self.imagelist)
        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"],
            {"green": self.green, "yellow": self.yellow, "red": self.quit, "blue": self.blue, "cancel": self.quit},
            -2,
        )
        self.onLayoutFinish.append(self.layoutFinished)
Example #19
0
 def __init__(self, session):
     Screen.__init__(self, session)
     Screen.setTitle(self, _("Mount Manager"))
     self["key_red"] = Label(" ")
     self["key_green"] = Label(_("Setup Mounts"))
     self["key_yellow"] = Label("Unmount")
     self["key_blue"] = Label("Mount")
     self["lab1"] = Label()
     self.onChangedEntry = []
     self.list = []
     self["list"] = List(self.list)
     self["list"].onSelectionChanged.append(self.selectionChanged)
     self["actions"] = ActionMap(
         ["WizardActions", "ColorActions", "MenuActions"],
         {
             "back": self.close,
             "green": self.SetupMounts,
             "red": self.saveMypoints,
             "yellow": self.Unmount,
             "blue": self.Mount,
             "menu": self.close,
         },
     )
     self.activityTimer = eTimer()
     self.activityTimer.timeout.get().append(self.updateList2)
     self.updateList()
Example #20
0
    def __init__(self, session, cmdList=None):
        if not cmdList:
            cmdList = []
        Screen.__init__(self, session)

        self.cmdList = cmdList

        self.sliderPackages = {}

        self.slider = Slider(0, len(cmdList))
        self["slider"] = self.slider
        self.activityslider = Slider(0, 100)
        self["activityslider"] = self.activityslider
        self.status = Label(_("Preparing... Please wait"))
        self["status"] = self.status
        self.package = Label()
        self["package"] = self.package

        self.packages = 0
        self.error = 0
        self.processed_packages = []

        self.activity = 0
        self.activityTimer = eTimer()
        self.activityTimer.callback.append(self.doActivityTimer)
        # self.activityTimer.start(100, False)

        self.ipkg = IpkgComponent()
        self.ipkg.addCallback(self.ipkgCallback)

        self.runningCmd = None
        self.runNextCmd()

        self["actions"] = ActionMap(["WizardActions"], {"ok": self.exit, "back": self.exit}, -1)
Example #21
0
    def __init__(self, session, slotid):
        Screen.__init__(self, session)
        Screen.setTitle(self, _("Tuner settings"))
        self.list = []

        ServiceStopScreen.__init__(self)
        self.stopService()

        ConfigListScreen.__init__(self, self.list)

        self["key_red"] = StaticText(_("Close"))
        self["key_green"] = StaticText(_("Save"))

        self["actions"] = ActionMap(
            ["SetupActions", "SatlistShortcutAction", "ColorActions"],
            {
                "ok": self.keySave,
                "cancel": self.keyCancel,
                "nothingconnected": self.nothingConnectedShortcut,
                "red": self.keyCancel,
                "green": self.keySave,
            },
            -2,
        )

        self.slotid = slotid
        self.nim = nimmanager.nim_slots[slotid]
        self.nimConfig = self.nim.config
        self.createConfigMode()
        self.createSetup()
Example #22
0
    def __init__(self, session, menu):
        Screen.__init__(self, session)
        self.setTitle(_("Event view"))

        self["actions"] = ActionMap(["OkCancelActions"], {"ok": self.okbuttonClick, "cancel": self.cancelClick})

        self["menu"] = MenuList(menu)
Example #23
0
    def __init__(self, session, ref):
        Screen.__init__(self, session)
        self.session = session
        self["actions"] = HelpableActionMap(
            self, "MoviePlayerActions", {"leavePlayer": (self.leavePlayer, _("leave movie player..."))}
        )

        if config.plugins.yttrailer.close_player_with_exit.value:
            self["closeactions"] = HelpableActionMap(
                self, "WizardActions", {"back": (self.close, _("leave movie player..."))}
            )

        self.allowPiP = False
        for x in (
            InfoBarShowHide,
            InfoBarBase,
            InfoBarSeek,
            InfoBarAudioSelection,
            InfoBarNotifications,
            InfoBarServiceNotifications,
            InfoBarPVRState,
            InfoBarMoviePlayerSummarySupport,
        ):
            x.__init__(self)

        self.returning = False
        self.skinName = "MoviePlayer"
        self.lastservice = session.nav.getCurrentlyPlayingServiceReference()
        self.session.nav.playService(ref)
        self.onClose.append(self.__onClose)
Example #24
0
    def __init__(self, session, event, ref, callback=None, singleEPGCB=None, multiEPGCB=None, similarEPGCB=None):
        Screen.__init__(self, session)
        self.skinName = "EventView"
        EventViewBase.__init__(self, event, ref, callback, similarEPGCB)
        self.key_green_choice = self.ADD_TIMER

        # Background for Buttons
        self["red"] = Pixmap()
        self["green"] = Pixmap()
        self["yellow"] = Pixmap()
        self["blue"] = Pixmap()

        self["epgactions1"] = ActionMap(
            ["OkCancelActions", "EventViewActions"],
            {"timerAdd": self.timerAdd, "openSimilarList": self.openSimilarList},
        )
        if self.isRecording:
            self["key_green"] = Button("")
        else:
            self["key_green"] = Button(_("Add timer"))

        if singleEPGCB:
            self["key_yellow"] = Button(_("Single EPG"))
            self["epgactions2"] = ActionMap(["EventViewEPGActions"], {"openSingleServiceEPG": singleEPGCB})
        else:
            self["key_yellow"] = Button("")
            self["yellow"].hide()

        if multiEPGCB:
            self["key_blue"] = Button(_("Multi EPG"))
            self["epgactions3"] = ActionMap(["EventViewEPGActions"], {"openMultiServiceEPG": multiEPGCB})
        else:
            self["key_blue"] = Button("")
            self["blue"].hide()
Example #25
0
    def __init__(self, session, xmlparse, selection):
        self.skin = SelectIpk.skin
        Screen.__init__(self, session)
        self["key_red"] = Button(_("Exit"))
        self.list = []
        self["list"] = MenuList([])
        self["info"] = Label()
        self["fspace"] = Label()
        self.addon = "emu"
        self.icount = 0
        self.downloading = False
        self["info"].setText("")
        self["actions"] = ActionMap(
            ["SetupActions", "ColorActions"], {"ok": self.selClicked, "cancel": self.close, "red": self.close}, -2
        )

        self.xmlparse = xmlparse
        self.selection = selection
        list = []
        for plugins in self.xmlparse.getElementsByTagName("plugins"):
            if str(plugins.getAttribute("cont").encode("utf8")) == self.selection:
                for plugin in plugins.getElementsByTagName("plugin"):
                    list.append(plugin.getAttribute("name").encode("utf8"))
                continue

        list.sort()
        self["countrymenu"] = MenuList(list)
Example #26
0
    def __init__(self, session):
        Screen.__init__(self, session)

        # Buttons
        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("OK"))
        self["key_yellow"] = StaticText(_("New"))
        self["key_blue"] = StaticText(_("Delete"))

        # Summary
        self.setup_title = "Growlee Configuration"
        self.onChangedEntry = []

        # Define Actions
        self["setupActions"] = ActionMap(
            ["SetupActions", "ColorActions"],
            {"blue": self.delete, "yellow": self.new, "cancel": self.keyCancel, "save": self.keySave},
        )

        self.hostElement = NoSave(ConfigSelection(choices=[(x, x.name.value) for x in config.plugins.growlee.hosts]))
        self.hostElement.addNotifier(self.setupList, initial_call=False)
        ConfigListScreen.__init__(self, [], session=session, on_change=self.changed)
        self.cur = self.hostElement.value

        # Trigger change
        self.setupList()
        self.changed()
    def __init__(self, session, timer):
        Screen.__init__(self, session)
        self.skinName = "TimerLog"
        self.timer = timer
        self.log_entries = self.timer.log_entries[:]

        self.fillLogList()

        self["loglist"] = MenuList(self.list)
        self["logentry"] = Label()
        self["summary_description"] = StaticText("")

        self["key_red"] = Button(_("Delete entry"))
        self["key_green"] = Button()
        self["key_yellow"] = Button("")
        self["key_blue"] = Button(_("Clear log"))

        self.onShown.append(self.updateText)

        self["actions"] = NumberActionMap(
            ["OkCancelActions", "DirectionActions", "ColorActions"],
            {
                "ok": self.keyClose,
                "cancel": self.keyClose,
                "up": self.up,
                "down": self.down,
                "left": self.left,
                "right": self.right,
                "red": self.deleteEntry,
                "blue": self.clearLog,
            },
            -1,
        )
        self.setTitle(_("PowerManager log"))
Example #28
0
    def __init__(self, session):
        w, h = session.desktop.size().width(), session.desktop.size().height()
        cw, ch = w / 2, h / 2
        #                             btn_red        btn_green     lb_red         lb_green      config
        self.skin = self.skin % (
            w,
            h,
            cw - 190,
            ch - 110,
            cw + 50,
            ch - 110,
            cw - 190,
            ch - 110,
            cw + 50,
            ch - 110,
            cw - 250,
            ch - 50,
        )

        Screen.__init__(self, session)
        self.session = session
        self["shortcuts"] = ActionMap(
            ["ShortcutActions", "SetupActions"],
            {"ok": self.keyOk, "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keyOk},
            -2,
        )
        self.list = []
        ConfigListScreen.__init__(self, self.list, session=self.session)

        self["key_red"] = StaticText(_("Cancel"))
        self["key_green"] = StaticText(_("Save"))
        self["current"] = StaticText(_(" "))
        vbcfg.g_position = vbcfg.getPosition()
        self.createSetup()
Example #29
0
    def __init__(self, session, args=None):

        Screen.__init__(self, session)

        self.skincache = []
        self.previewPath = ""
        self.parent = ""
        path.walk(self.root, self.find, "")
        self.countVariants()
        self.fixLabels()
        self.skincache = sorted(self.skincache, key=lambda k: k["label"])
        self.buildSkinList("")

        self["key_red"] = StaticText(_("Close"))
        self["introduction"] = StaticText(_("Press OK to activate the selected skin."))
        self["SkinList"] = MenuList(self.skinlist)
        self["Preview"] = Pixmap()

        self["actions"] = NumberActionMap(
            ["WizardActions", "InputActions", "EPGSelectActions"],
            {
                "ok": self.ok,
                "back": self.back,
                "red": self.back,
                "up": self.up,
                "down": self.down,
                "left": self.left,
                "right": self.right,
                "info": self.info,
            },
            -1,
        )

        self.onLayoutFinish.append(self.layoutFinished)
Example #30
0
    def __init__(self, session):
        Screen.__init__(self, session)

        self["key_red"] = StaticText(_("Exit"))
        self["key_green"] = StaticText(_("Update"))
        self["key_yellow"] = StaticText()

        self["space_label"] = StaticText()
        self["space_bar"] = Progress()

        self.mediuminfo = []
        self.formattable = False
        self["details"] = ScrollLabel()
        self["info"] = StaticText()

        self["toolboxactions"] = ActionMap(
            ["ColorActions", "DVDToolbox", "OkCancelActions"],
            {
                "red": self.exit,
                "green": self.update,
                "yellow": self.format,
                "cancel": self.exit,
                "pageUp": self.pageUp,
                "pageDown": self.pageDown,
            },
        )
        self.update()
        hotplugNotifier.append(self.update)
        self.onLayoutFinish.append(self.layoutFinished)