X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=autotimer%2Fsrc%2FAutoTimerSettings.py;h=bbb6da568840fc6fa88dec5131eeccae7de74f2f;hb=6f13fe12ce79898166918177eb9826b7ff945d53;hp=5f0a686051eea22023d18d33d7d968150679fb8a;hpb=8552cd658c9b729486f897ff13b39a430165e850;p=vuplus_dvbapp-plugin diff --git a/autotimer/src/AutoTimerSettings.py b/autotimer/src/AutoTimerSettings.py index 5f0a686..bbb6da5 100644 --- a/autotimer/src/AutoTimerSettings.py +++ b/autotimer/src/AutoTimerSettings.py @@ -10,20 +10,20 @@ from Screens.Setup import SetupSummary # GUI (Components) from Components.ActionMap import ActionMap -from Components.Button import Button +from Components.Sources.StaticText import StaticText # Configuration from Components.config import config, getConfigListEntry class AutoTimerSettings(Screen, ConfigListScreen): - """Configuration of AutoTimer""" - - skin = """ - - - - - + skin = """ + + + + + + + """ def __init__(self, session): @@ -33,21 +33,35 @@ class AutoTimerSettings(Screen, ConfigListScreen): self.setup_title = _("AutoTimer Settings") self.onChangedEntry = [] - list = [ - getConfigListEntry(_("Poll automatically"), config.plugins.autotimer.autopoll), - getConfigListEntry(_("Poll Interval (in h)"), config.plugins.autotimer.interval), - getConfigListEntry(_("Show in Extensionmenu"), config.plugins.autotimer.show_in_extensionsmenu), - getConfigListEntry(_("Modify existing Timers"), config.plugins.autotimer.refresh), - getConfigListEntry(_("Guess existing Timer based on Begin/End"), config.plugins.autotimer.try_guessing), - getConfigListEntry(_("Add timer as disabled on conflict"), config.plugins.autotimer.disabled_on_conflict), - getConfigListEntry(_("Editor for new AutoTimers"), config.plugins.autotimer.editor), - ] - - ConfigListScreen.__init__(self, list, session = session, on_change = self.changed) + 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(_("Poll Interval (in h)"), config.plugins.autotimer.interval, _("This is the delay in hours that the AutoTimer will wait after a search to search the EPG again.")), + 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 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(_("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.")), + ], + 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"].onSelectionChanged.append(self.updateHelp) - # Initialize Buttons - self["key_red"] = Button(_("Cancel")) - self["key_green"] = Button(_("OK")) + # Initialize widgets + self["key_green"] = StaticText(_("OK")) + self["key_red"] = StaticText(_("Cancel")) + self["help"] = StaticText() # Define Actions self["actions"] = ActionMap(["SetupActions"], @@ -65,12 +79,14 @@ class AutoTimerSettings(Screen, ConfigListScreen): def setCustomTitle(self): self.setTitle(_("Configure AutoTimer behavior")) + def updateHelp(self): + cur = self["config"].getCurrent() + if cur: + self["help"].text = cur[2] + def changed(self): for x in self.onChangedEntry: - try: - x() - except: - pass + x() def getCurrentEntry(self): return self["config"].getCurrent()[0]