diff options
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Makefile.am | 2 | ||||
| -rw-r--r-- | lib/python/Components/UsageConfig.py | 7 | ||||
| -rw-r--r-- | lib/python/Screens/EpgSelection.py | 17 | ||||
| -rw-r--r-- | lib/python/Screens/InfoBarGenerics.py | 10 |
4 files changed, 28 insertions, 8 deletions
diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am index a5058cf9..9826daab 100644 --- a/lib/python/Components/Makefile.am +++ b/lib/python/Components/Makefile.am @@ -11,4 +11,4 @@ install_PYTHON = \ AVSwitch.py Network.py RFmod.py DiskInfo.py NimManager.py Lcd.py \ EpgList.py ScrollLabel.py Timezones.py Language.py HelpMenuList.py \ BlinkingPixmap.py Pixmap.py ConditionalWidget.py Slider.py LanguageList.py \ - PluginList.py PluginComponent.py RecordingConfig.py About.py + PluginList.py PluginComponent.py RecordingConfig.py About.py UsageConfig.py diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py new file mode 100644 index 00000000..8b4a2960 --- /dev/null +++ b/lib/python/Components/UsageConfig.py @@ -0,0 +1,7 @@ +from config import * +import os +from enigma import * + +def InitUsageConfig(): + config.usage = ConfigSubsection(); + config.usage.epgtoggle = configElement("config.usage.epgtoggle", configSelection, 1, (("yes", _("yes")), ("no", _("no"))) );
\ No newline at end of file diff --git a/lib/python/Screens/EpgSelection.py b/lib/python/Screens/EpgSelection.py index 64be16b7..ec461e2f 100644 --- a/lib/python/Screens/EpgSelection.py +++ b/lib/python/Screens/EpgSelection.py @@ -9,6 +9,7 @@ from RecordTimer import RecordTimerEntry, parseEvent from TimerEdit import TimerEditList from TimerEntry import TimerEntry from ServiceReference import ServiceReference +from Components.config import config, currentConfigSelectionElement import xml.dom.minidom @@ -38,22 +39,26 @@ class EPGSelection(Screen): self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"], { - "cancel": self.closeClose, + "cancel": self.closeScreen, "ok": self.eventSelected, "timerAdd": self.timerAdd, "yellow": self.yellowButtonPressed, "blue": self.blueButtonPressed, - "info": self.closeClose + "info": self.infoKeyPressed }) self["actions"].csel = self self.onLayoutFinish.append(self.onCreate) - def closeClose(self): + def infoKeyPressed(self): + if currentConfigSelectionElement(config.usage.epgtoggle) == "yes": + self.close(True) + else: + self.close(False) + + def closeScreen(self): self.close(False) - - def closeInfo(self): - self.close(True) + #just used in multipeg def onCreate(self): diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 921dd587..10a810cf 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -33,6 +33,8 @@ from enigma import * import time import os +from Components.config import config, currentConfigSelectionElement + # hack alert! from Menu import MainMenu, mdom @@ -358,9 +360,15 @@ class InfoBarEPG: def __init__(self): self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { - "showEPGList": (self.showEPGList, _("show EPG...")), + "showEPGList": (self.showEPG, _("show EPG...")), }) + def showEPG(self): + if currentConfigSelectionElement(config.usage.epgtoggle) == "yes": + self.openSingleServiceEPG() + else: + self.showEPGList() + def showEPGList(self): bouquets = self.servicelist.getBouquetList() if bouquets is None: |
