make epg toggling configurable (default set to unusable epg on INFO key)
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index 921dd58714df07e88e826f83a46879bb1e907f50..10a810cfd8ae5c6cfa1d74bbc1287d4aea0a9183 100644 (file)
@@ -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: