GMEPG - added toggle between primetime and now under TEXT button
authorims <ims21@users.sourceforge.net>
Fri, 1 May 2015 08:48:58 +0000 (10:48 +0200)
committerlittlesat <littlesat99@yahoo.com>
Fri, 1 May 2015 09:57:45 +0000 (11:57 +0200)
Signed-off-by: littlesat <littlesat99@yahoo.com>

data/keymap.xml
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py

index 74eac40..dd11e83 100644 (file)
                <key id="KEY_TV" mapto="preview" flags="m"/>
                <key id="KEY_REWIND" mapto="prevDay" flags="m"/>
                <key id="KEY_FASTFORWARD" mapto="nextDay" flags="m"/>
+               <key id="KEY_TEXT" mapto="primeTime" flags="m"/>
        </map>
 
        <map context="EventViewActions">
index 532dec3..d7061ed 100644 (file)
@@ -862,7 +862,8 @@ class GraphMultiEPG(Screen, HelpableScreen):
                                "prevService": (self.prevPressed,    _("Goto previous page of events")),
                                "preview":     (self.preview,        _("Preview selected channel")),
                                "nextDay":     (self.nextDay,        _("Goto next day of events")),
-                               "prevDay":     (self.prevDay,        _("Goto previous day of events"))
+                               "prevDay":     (self.prevDay,        _("Goto previous day of events")),
+                               "primeTime":   (self.togglePrimeNow, _("Goto primetime / now"))
                        }, -1)
                self["epgactions"].csel = self
 
@@ -966,6 +967,12 @@ class GraphMultiEPG(Screen, HelpableScreen):
                if self.bouquetChangeCB:
                        self.bouquetChangeCB(-1, self)
 
+       def togglePrimeNow(self):
+               if self.time_mode == self.TIME_NOW:
+                       self.setNewTime("prime_time")
+               elif self.time_mode == self.TIME_PRIME:
+                       self.setNewTime("now_time")
+
        def enterDateTime(self):
                text = _("Select action")
                menu = []