def __init__(self, session, entry): Screen.__init__(self, session) self.title = _("WeatherPlugin: Edit Entry") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.keySave, "red": self.keyCancel, "blue": self.keyDelete, "yellow": self.searchLocation, "cancel": self.keyCancel }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["key_blue"] = StaticText(_("Delete")) self["key_yellow"] = StaticText(_("Search Code")) if entry is None: self.newmode = 1 self.current = initWeatherPluginEntryConfig() else: self.newmode = 0 self.current = entry cfglist = [ getConfigListEntry(_("City"), self.current.city), getConfigListEntry(_("Location code"), self.current.weatherlocationcode), getConfigListEntry(_("System"), self.current.degreetype) ] ConfigListScreen.__init__(self, cfglist, session)
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()
def __init__(self, session, parent): Screen.__init__(self, session, parent = parent) self["SetupTitle"] = StaticText(_(parent.setup_title)) self["SetupEntry"] = StaticText("") self["SetupValue"] = StaticText("") self.onShow.append(self.addWatcher) self.onHide.append(self.removeWatcher)
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"))
def __init__(self, session, defaultUser): Screen.__init__(self, session) self.session = session self.userlist = YouTubeUserList() self.defaultUser = defaultUser self["label_info"] = Label(_("To use the selected feature you have to login to YouTube. Select a user-profile to login!")) self["userlist"] = self.userlist self["key_red"] = Button(_("delete user")) self["key_green"] = Button(_("add user")) self["key_yellow"] = Button(_("edit user")) self["key_blue"] = Button(_("set default")) self["actions"] = ActionMap(["YouTubeUserListScreenActions"], { "delete": self.keyDelete, "add": self.keyAddUser, "edit": self.keyEditUser, "default": self.keySetAsDefault, "ok": self.ok, "cancel": self.close, "up": self.up, "down": self.down, "left": self.left, "right": self.right, }, -2) self.onLayoutFinish.append(self.initialUserlistUpdate)
def __init__(self, session, project = None): Screen.__init__(self, session) self.project = project self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["key_yellow"] = StaticText(_("Load")) if config.usage.setup_level.index >= 2: # expert+ self["key_blue"] = StaticText(_("Save")) else: self["key_blue"] = StaticText() if config.usage.setup_level.index >= 2: # expert+ infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename") else: infotext = "" self["info"] = StaticText(infotext) self.keydict = {} self.settings = project.settings ConfigListScreen.__init__(self, []) self.initConfigList() self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "green": self.exit, "red": self.cancel, "blue": self.saveProject, "yellow": self.loadProject, "cancel": self.cancel, "ok": self.ok, }, -2) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, plugin_path): Screen.__init__(self, session) self.skin_path = plugin_path self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Restore")) self["key_yellow"] = StaticText(_("Delete")) self.sel = [] self.val = [] self.entry = False self.exe = False self.path = "" self["actions"] = NumberActionMap(["SetupActions"], { "ok": self.KeyOk, "cancel": self.keyCancel }, -1) self["shortcuts"] = ActionMap(["ShortcutActions"], { "red": self.keyCancel, "green": self.KeyOk, "yellow": self.deleteFile, }) self.flist = [] self["filelist"] = MenuList(self.flist) self.fill_list() self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, plugin_path): self.skin_path = plugin_path Screen.__init__(self, session) self.list = [ ] self.onChangedEntry = [ ] ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry) self.setup_title = _("Setup AnalogClock") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "ok": self.keySave, "blue": self.keyBlue, }, -2) self["key_green"] = Label(_("Ok")) self["key_red"] = Label(_("Cancel")) self["red"] = Pixmap() self["green"] = Pixmap() self["blue"] = Pixmap() self.changeItemsTimer = eTimer() self.changeItemsTimer.timeout.get().append(self.changeItems) self.enable = _("Enable AnalogClock") self.itemSize = _("Size") self.itemXpos = _("X Position") self.itemYpos = _("Y Position") self.extended = _("Extended settings") self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, args = 0): self.session = session Screen.__init__(self, session) self.list = [] for i in range(7): self.list.append(getConfigListEntry(" 1. " + weekdays[i] + ": " + _("Wakeup"), config.plugins.elektro.wakeup[i])) self.list.append(getConfigListEntry(" 1. " + weekdays[i] + ": " + _("Sleep"), config.plugins.elektro.sleep[i])) self.list.append(getConfigListEntry(" 1. " + _("Next day starts at"), config.plugins.elektro.nextday, _("If the box is supposed to enter deep standby e.g. monday night at 1 AM, it actually is already tuesday. To enable this anyway, differing next day start time can be specified here."))) for i in range(7): self.list.append(getConfigListEntry(" 2. " + weekdays[i] + ": " + _("Wakeup"), config.plugins.elektro.wakeup2[i])) self.list.append(getConfigListEntry(" 2. " + weekdays[i] + ": " + _("Sleep"), config.plugins.elektro.sleep2[i])) self.list.append(getConfigListEntry(" 2. " + _("Next day starts at"), config.plugins.elektro.nextday2, _("If the box is supposed to enter deep standby e.g. monday night at 1 AM, it actually is already tuesday. To enable this anyway, differing next day start time can be specified here."))) ConfigListScreen.__init__(self, self.list) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Ok")) self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "red": self.cancel, "green": self.save, "save": self.save, "cancel": self.cancel, "ok": self.save, }, -2)
def __init__(self, session): Screen.__init__(self, session) # Summary self.setup_title = _("AutoTimer Settings") self.onChangedEntry = [] ConfigListScreen.__init__( self, [ getConfigListEntry(_("Poll automatically"), config.plugins.autotimer.autopoll, _("Unless this is enabled AutoTimer will NOT automatically look for events matching your AutoTimers but only when you leave the GUI with the green button.")), getConfigListEntry(_("Only poll while in standby"), config.plugins.autotimer.onlyinstandby, _("When this is enabled AutoTimer will ONLY check for new events whilst in stanadby.")), getConfigListEntry(_("Startup delay (in min)"), config.plugins.autotimer.delay, _("This is the delay in minutes that the AutoTimer will wait on initial launch to not delay enigma2 startup time.")), getConfigListEntry(_("Poll Interval (in mins)"), config.plugins.autotimer.interval, _("This is the delay in minutes that the AutoTimer will wait after a search to search the EPG again.")), getConfigListEntry(_("Only add timer for next x days"), config.plugins.autotimer.maxdaysinfuture, _("You can control for how many days in the future timers are added. Set this to 0 to disable this feature.")), getConfigListEntry(_("Show in plugin browser"), config.plugins.autotimer.show_in_plugins, _("Enable this to be able to access the AutoTimer Overview from within the plugin browser.")), getConfigListEntry(_("Show in extension menu"), config.plugins.autotimer.show_in_extensionsmenu, _("Enable this to be able to access the AutoTimer Overview from within the extension menu.")), getConfigListEntry(_("Modify existing timers"), config.plugins.autotimer.refresh, _("This setting controls the behavior when a timer matches a found event.")), getConfigListEntry(_("Guess existing timer based on begin/end"), config.plugins.autotimer.try_guessing, _("If this is enabled an existing timer will also be considered recording an event if it records at least 80%% of the it.")), getConfigListEntry(_("Add similar timer on conflict"), config.plugins.autotimer.addsimilar_on_conflict, _("If a timer conflict occurs, AutoTimer will search outside the timespan for a similar event and add it.")), getConfigListEntry(_("Add timer as disabled on conflict"), config.plugins.autotimer.disabled_on_conflict, _("This toggles the behavior on timer conflicts. If an AutoTimer matches an event that conflicts with an existing timer it will not ignore this event but add it disabled.")), getConfigListEntry(_("Include \"AutoTimer\" in tags"), config.plugins.autotimer.add_autotimer_to_tags, _("If this is selected, the tag \"AutoTimer\" will be given to timers created by this plugin.")), getConfigListEntry(_("Include AutoTimer name in tags"), config.plugins.autotimer.add_name_to_tags, _("If this is selected, the name of the respective AutoTimer will be added as a tag to timers created by this plugin.")), getConfigListEntry(_("Show notification on conflicts"), config.plugins.autotimer.notifconflict, _("By enabling this you will be notified about timer conflicts found during automated polling. There is no intelligence involved, so it might bother you about the same conflict over and over.")), getConfigListEntry(_("Show notification on similars"), config.plugins.autotimer.notifsimilar, _("By enabling this you will be notified about similar timers added during automated polling. There is no intelligence involved, so it might bother you about the same conflict over and over.")), getConfigListEntry(_("Editor for new AutoTimers"), config.plugins.autotimer.editor, _("The editor to be used for new AutoTimers. This can either be the Wizard or the classic editor.")), getConfigListEntry(_("Support \"Fast Scan\"?"), config.plugins.autotimer.fastscan, _("When supporting \"Fast Scan\" the service type is ignored. You don't need to enable this unless your Image supports \"Fast Scan\" and you are using it.")), getConfigListEntry(_("Skip poll during records"), config.plugins.autotimer.skip_during_records, _("If enabled, the polling will be skipped if a recording is in progress.")), ], session = session, on_change = self.changed ) def selectionChanged(): if self["config"].current: self["config"].current[1].onDeselect(self.session) self["config"].current = self["config"].getCurrent() if self["config"].current: self["config"].current[1].onSelect(self.session) for x in self["config"].onSelectionChanged: x() self["config"].selectionChanged = selectionChanged self["config"].onSelectionChanged.append(self.updateHelp) # Initialize widgets self["key_green"] = StaticText(_("OK")) self["key_red"] = StaticText(_("Cancel")) self["help"] = StaticText() # Define Actions self["actions"] = ActionMap(["SetupActions"], { "cancel": self.keyCancel, "save": self.Save, } ) # Trigger change self.changed() self.onLayoutFinish.append(self.setCustomTitle)
def __init__(self, session, plugin_path): self.skin_path = plugin_path Screen.__init__(self, session) self.list = [ ] self.onChangedEntry = [ ] ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedClockEntry) self.setup_title = _("Setup AnalogClock colors") self["actions"] = ActionMap(["SetupActions", "ColorActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "ok": self.keySave, }, -2) self["key_green"] = Label(_("Ok")) self["key_red"] = Label(_("Cancel")) self["version"] = Label("v%s" % VERSION) cfg.background.value[0] = int(cfg.transparency.value) self.background = _("Background (a,r,g,b)") self.list.append(getConfigListEntry(_("Hand's color (a,r,g,b)"), cfg.hands_color)) self.list.append(getConfigListEntry(_("Seconds color (a,r,g,b)"), cfg.shand_color)) self.list.append(getConfigListEntry(_("Face's color (a,r,g,b)"), cfg.faces_color)) self.list.append(getConfigListEntry( self.background, cfg.background)) self["config"].list = self.list self["config"].setList(self.list) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session): Screen.__init__(self, session) self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions"], { "cancel": self.KeyExit, "red": self.KeyExit, "green": self.KeyGreen, "yellow": self.KeyYellow, "blue": self.KeyBlue, "ok": self.KeyOk }, -1) self["key_red"] = StaticText(_("Close")) self["key_green"] = StaticText(_("Thumbnails")) self["key_yellow"] = StaticText("") self["key_blue"] = StaticText(_("Setup")) self["label"] = StaticText("") self["thn"] = Pixmap() currDir = config.pic.lastDir.value if not pathExists(currDir): currDir = "/" self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(jpeg|jpg|jpe|png|bmp|gif)") self["filelist"] = self.filelist self["filelist"].onSelectionChanged.append(self.selectionChanged) self.ThumbTimer = eTimer() self.ThumbTimer.callback.append(self.showThumb) self.picload = ePicLoad() self.picload.PictureData.get().append(self.showPic) self.onLayoutFinish.append(self.setConf)
def __init__(self, session): Screen.__init__(self, session) Screen.setTitle(self, _("Plugin Browser")) self.firsttime = True self["key_red"] = Button(_("Remove plugins")) self["key_green"] = Button(_("Download plugins")) self.list = [] self["list"] = PluginList(self.list) if config.usage.sort_pluginlist.getValue(): self["list"].list.sort() self["actions"] = ActionMap(["WizardActions", "MenuActions"], { "ok": self.save, "back": self.close, "menu": self.openSetup, }) self["PluginDownloadActions"] = ActionMap(["ColorActions"], { "red": self.delete, "green": self.download }) self.onFirstExecBegin.append(self.checkWarnings) self.onShown.append(self.updateList) self.onChangedEntry = [] self["list"].onSelectionChanged.append(self.selectionChanged) self.onLayoutFinish.append(self.saveListsize)
def __init__(self, session): Screen.__init__(self, session) self['connect'] = MultiPixmap() self['connect'].setPixmapNum(0) self['lab1'] = Label('') self.mylist = ['Libraries', 'Binaries', 'Cams', 'Scripts', 'Bootlogos', 'Uninstall files', 'General Settings', 'Cron', 'Settings Channels Bouquets', 'Openvpn', 'Satellites Terrestrial', 'Plugins', 'END'] self.mytmppath = '/media/hdd/' if fileExists('/etc/bhpersonalbackup'): f = open('/etc/bhpersonalbackup', 'r') self.mytmppath = f.readline().strip() f.close() self.mytmppath += 'bhbackuptmp' self.activityTimer = eTimer() self.activityTimer.timeout.get().append(self.updatepix) self.onShow.append(self.startShow) self.onClose.append(self.delTimer) system('rm -rf ' + self.mytmppath) system('mkdir ' + self.mytmppath) system('mkdir ' + self.mytmppath + '/etc') system('mkdir ' + self.mytmppath + '/usr') configfile.save()
def __init__(self, session, fe_num, text): Screen.__init__(self, session) self.setup_title = _("Blind scan state") Screen.setTitle(self, _(self.setup_title)) self["list"]=List() self["text"]=Label() self["text"].setText(text) self["post_action"]=Label() self["progress"]=Label() self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "ok": self.keyOk, "cancel": self.keyCancel, "green": self.keyGreen, }, -2) self.fe_num = fe_num self["constellation"] = CanvasSource() self.onLayoutFinish.append(self.updateConstellation) self.tmr = eTimer() self.tmr.callback.append(self.updateConstellation) self.constellation_supported = None if fe_num != -1: self.post_action=1 self.finished=0 self.keyGreen() else: self.post_action=-1
def __init__(self, session, args = 0): self.session = session Screen.__init__(self, session) self.list = [] self.list.append(getConfigListEntry(_("NAS/Server Name or IP"), config.plugins.elektro.NASname)) self.list.append(getConfigListEntry(_("Username"), config.plugins.elektro.NASuser)) self.list.append(getConfigListEntry(_("Password"), config.plugins.elektro.NASpass)) self.list.append(getConfigListEntry(_("Command [poweroff, shutdown -h,...]"), config.plugins.elektro.NAScommand)) self.list.append(getConfigListEntry(_("Telnet Port"), config.plugins.elektro.NASport)) self.list.append(getConfigListEntry(_("Waiting until poweroff"), config.plugins.elektro.NASwait)) ConfigListScreen.__init__(self, self.list) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("Ok")) self["key_yellow"] = Button(_("Run")) self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "red": self.cancel, "green": self.save, "yellow": self.run, "save": self.save, "cancel": self.cancel, "ok": self.save, }, -2)
def __init__(self, session, timerinstance): self.session = session self.list = [] self.timerinstance = timerinstance self.remotetimer_old = config.ipboxclient.remotetimers.value Screen.__init__(self, session) ConfigListScreen.__init__(self, self.list) self.setTitle(_('IPTV Client')) self["VKeyIcon"] = Boolean(False) self["text"] = StaticText(_('NOTE: the remote HDD feature require samba installed on server box.')) self["key_red"] = Button(_('Cancel')) self["key_green"] = Button(_('Save')) self["key_yellow"] = Button(_('Scan')) self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "yellow": self.keyScan }, -2) self.populateMenu() if not config.ipboxclient.firstconf.value: self.timer = eTimer() self.timer.callback.append(self.scanAsk) self.timer.start(100)
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)
def __init__(self, session): Screen.__init__(self, session) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Save")) self["key_yellow"] = StaticText() self.selectedFiles = config.plugins.configurationbackup.backupdirs.value defaultDir = '/' inhibitDirs = ["/bin", "/boot", "/dev", "/autofs", "/lib", "/proc", "/sbin", "/sys", "/hdd", "/tmp", "/mnt", "/media"] self.filelist = MultiFileSelectList(self.selectedFiles, defaultDir, inhibitDirs = inhibitDirs ) self["checkList"] = self.filelist self["actions"] = ActionMap(["DirectionActions", "OkCancelActions", "ShortcutActions"], { "cancel": self.exit, "red": self.exit, "yellow": self.changeSelectionState, "green": self.saveSelection, "ok": self.okClicked, "left": self.left, "right": self.right, "down": self.down, "up": self.up }, -1) if not self.selectionChanged in self["checkList"].onSelectionChanged: self["checkList"].onSelectionChanged.append(self.selectionChanged) self.onLayoutFinish.append(self.layoutFinished)
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 = [] if not isinstance(userSatlist, str): userSatlist = "" else: userSatlist = userSatlist.replace("]", "").replace("[", "") for sat in nimmanager.getSatList(): selected = False sat_str = str(sat[0]) if userSatlist and ("," not in userSatlist and sat_str == userSatlist) or ((', ' + sat_str + ',' in userSatlist) or (userSatlist.startswith(sat_str + ',')) or (userSatlist.endswith(', ' + sat_str))): 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"))
def __init__(self, session): self.skin = magicBackupPanel_Step3_Skin Screen.__init__(self, session) self['status'] = MultiPixmap() self['status'].setPixmapNum(0) self['label'] = Label('') self.mylist = ['Libraries', 'Firmwares', 'Binaries', 'SoftCams', 'Scripts', 'Bootlogos', 'Uninstall files', 'General Settings', 'Cron', 'Settings Channels Bouquets', 'Openvpn', 'Satellites Terrestrial', 'Plugins', 'END'] self.mytmppath = '/media/hdd/' if fileExists('/etc/magic/.magicbackup_location'): fileExists('/etc/magic/.magicbackup_location') f = open('/etc/magic/.magicbackup_location', 'r') self.mytmppath = f.readline().strip() f.close() else: fileExists('/etc/magic/.magicbackup_location') self.mytmppath += 'magicbackup_location' self.activityTimer = eTimer() self.activityTimer.timeout.get().append(self.updatepix) self.onShow.append(self.startShow) self.onClose.append(self.delTimer) system('rm -rf ' + self.mytmppath) system('mkdir ' + self.mytmppath) system('mkdir ' + self.mytmppath + '/etc') system('mkdir ' + self.mytmppath + '/lib') system('mkdir ' + self.mytmppath + '/usr') system('mkdir ' + self.mytmppath + '/scripts') system('mkdir ' + self.mytmppath + '/media') system('mkdir ' + self.mytmppath + '/media/hdd') system('mkdir ' + self.mytmppath + '/media/usb') system('mkdir ' + self.mytmppath + '/media/usb2') system('mkdir ' + self.mytmppath + '/media/usb3') configfile.save()
def __init__(self, session): Screen.__init__(self, session) # for the skin: first try VideoSetup, then Setup, this allows individual skinning self.skinName = ["VideoSetup", "Setup" ] self.setup_title = _("Video settings") self["HelpWindow"] = Pixmap() self["HelpWindow"].hide() self["VKeyIcon"] = Boolean(False) self['footnote'] = Label() self.hw = iAVSwitch self.onChangedEntry = [ ] # handle hotplug by re-creating setup self.onShow.append(self.startHotplug) self.onHide.append(self.stopHotplug) self.list = [ ] ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry) from Components.ActionMap import ActionMap self["actions"] = ActionMap(["SetupActions", "MenuActions", "ColorActions"], { "cancel": self.keyCancel, "save": self.apply, "menu": self.closeRecursive, }, -2) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self["description"] = Label("") self.createSetup() self.grabLastGoodMode() self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, args = None): #self.skin = CurlyTx.skin Screen.__init__(self, session) HelpableScreen.__init__(self) #self.skinName = [ "CurlyTx", "Setup" ] self["text"] = ScrollLabel("foo") self["key_red"] = StaticText(_("Settings")) self["key_green"] = StaticText(_("Reload")) self["key_yellow"] = StaticText(_("Prev")) self["key_blue"] = StaticText(_("Next")) self["actions"] = ActionMap( ["WizardActions", "ColorActions", "InputActions", "InfobarEPGActions"], { "ok": self.close, "back": self.close, "up": self.pageUp, "down": self.pageDown, "red": self.showSettings, "green": self.reload, "yellow": self.prevPage, "blue": self.nextPage, "showEventInfo": self.showHeader }, -1) self.loadHelp() self.loadButtons() self.onLayoutFinish.append(self.afterLayout)
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)
def __init__(self, session): Screen.__init__(self, session) self.session = session self.setup_title = _("AutoBouquetsMaker Configure") Screen.setTitle(self, self.setup_title) self.onChangedEntry = [ ] self.list = [] ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry) self.activityTimer = eTimer() self.activityTimer.timeout.get().append(self.prepare) self["actions"] = ActionMap(["SetupActions", 'ColorActions', 'VirtualKeyboardActions', "MenuActions"], { "ok": self.keySave, "cancel": self.keyCancel, "red": self.keyCancel, "green": self.keySave, "menu": self.keyCancel, }, -2) self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("OK")) self["description"] = Label(_("")) self["pleasewait"] = Label() self.onLayoutFinish.append(self.populate)
def __init__(self, session, list, selected_caids): Screen.__init__(self, session) self.list = SelectionList() self["list"] = self.list for listindex in range(len(list)): if find_in_list(selected_caids,list[listindex][0],0): self.list.addSelection(list[listindex][0], list[listindex][1], listindex, True) else: self.list.addSelection(list[listindex][0], list[listindex][1], listindex, False) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Save")) self["introduction"] = StaticText(_("Press OK to select/deselect a CAId.")) self["actions"] = ActionMap(["ColorActions","SetupActions"], { "ok": self.list.toggleSelection, "cancel": self.cancel, "green": self.greenPressed, "red": self.cancel }, -1) self.onShown.append(self.setWindowTitle)
def __init__(self, session, menu_path="", args=None): Screen.__init__(self, session) screentitle = _("Button setup") if config.usage.show_menupath.value == 'large': menu_path += screentitle title = menu_path self["menu_path_compressed"] = StaticText("") elif config.usage.show_menupath.value == 'small': title = screentitle self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "") else: title = screentitle self["menu_path_compressed"] = StaticText("") Screen.setTitle(self, title) self['description'] = Label(_('On your remote, click on the button you want to change')) self.session = session self.list = [] self.ButtonSetupFunctions = getButtonSetupFunctions() for x in ButtonSetupKeys: self.list.append(ChoiceEntryComponent('',(_(x[0]), x[1]))) self["list"] = ChoiceList(list=self.list[:config.misc.ButtonSetup.additional_keys.value and len(ButtonSetupKeys) or 10], selection = 0) self["choosen"] = ChoiceList(list=[]) self.getFunctions() self["actions"] = ActionMap(["OkCancelActions"], { "cancel": self.close, }, -1) self["ButtonSetupButtonActions"] = ButtonSetupActionMap(["ButtonSetupActions"], dict((x[1], self.ButtonSetupGlobal) for x in ButtonSetupKeys)) self.longkeyPressed = False self.onLayoutFinish.append(self.__layoutFinished) self.onExecBegin.append(self.getFunctions) self.onShown.append(self.disableKeyMap) self.onClose.append(self.enableKeyMap)
def __init__(self, session): Screen.__init__(self, session) self.setup_title = _("Blind scan for dreambox DVB-S2 tuners") Screen.setTitle(self, _(self.setup_title)) self.updateSatList() self.service = session.nav.getCurrentService() self.feinfo = None frontendData = None if self.service is not None: self.feinfo = self.service.frontendInfo() frontendData = self.feinfo and self.feinfo.getAll(True) self.createConfig(frontendData) del self.feinfo del self.service try: self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceOrGroup() except: self.session.postScanService = self.session.nav.getCurrentlyPlayingServiceReference() self["actions"] = NumberActionMap(["SetupActions"], { "ok": self.keyGo, "cancel": self.keyCancel, }, -2) self.list = [] ConfigListScreen.__init__(self, self.list) if not self.scan_nims.value == "": self.createSetup() self["introduction"] = Label(_("Press OK to start the scan")) else: self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."))
def __init__(self, session, menu_path=""): Screen.__init__(self, session) self.skinName = "Setup" self.menu_path = menu_path self["menu_path_compressed"] = StaticText() self['footnote'] = Label() self["HelpWindow"] = Pixmap() self["HelpWindow"].hide() self["VKeyIcon"] = Boolean(False) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Save")) self["description"] = Label(_("")) self.onChangedEntry = [ ] self.setup = "recording" list = [] ConfigListScreen.__init__(self, list, session = session, on_change = self.changedEntry) self.createSetup() self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "MenuActions"], { "green": self.keySave, "red": self.keyCancel, "cancel": self.keyCancel, "ok": self.ok, "menu": self.closeRecursive, }, -2) self.onLayoutFinish.append(self.layoutFinished)
def __init__(self, session, args = 0): Screen.__init__(self, session) self.hardware_info = HardwareInfo() self.device=self.hardware_info.get_device_name() self.mac=getMacAddress() self.mac_end=self.mac[6:] self.dreamIRCconf = ConfigSubsection() self.reloadFile() list = [] list.append(getConfigListEntry(_('Nickname'), self.dreamIRCconf.nick)) if config.usage.setup_level.index > 1: # advanced list.append(getConfigListEntry(_('Passwd'), self.dreamIRCconf.passwd)) if config.usage.setup_level.index >= 1: # intermediate+ list.append(getConfigListEntry(_('Server1'), self.dreamIRCconf.server1)) if config.usage.setup_level.index > 1: # advanced list.append(getConfigListEntry(_('Server2'), self.dreamIRCconf.server2)) list.append(getConfigListEntry(_('Server3'), self.dreamIRCconf.server3)) if config.usage.setup_level.index >= 1: # intermediate+ list.append(getConfigListEntry(_('Port'), self.dreamIRCconf.port)) list.append(getConfigListEntry(_('Channel'), self.dreamIRCconf.channel)) if config.usage.setup_level.index > 1: # i list.append(getConfigListEntry(_('Debug'), self.dreamIRCconf.debug)) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Save")) ConfigListScreen.__init__(self, list) self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], { "green": self.saveAndExit, "red": self.dontSaveAndExit, "cancel": self.dontSaveAndExit }, -1)