ok in multiepg is now similar to press info
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 09:39:49 +0000 (09:39 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Apr 2006 09:39:49 +0000 (09:39 +0000)
change service is now possible via red button when the selected event is the now event

data/keymap.xml
lib/python/Screens/EpgSelection.py

index 783dbf13fca83500a414f92931b1f040bc8d74ee..c313be3975ad77dda64416274a990dc3a2b90077 100644 (file)
                <key id="KEY_GREEN" mapto="timerAdd" flags="m" />
                <key id="KEY_YELLOW" mapto="yellow" flags="mr" />
                <key id="KEY_BLUE" mapto="blue" flags="mr" />
+               <key id="KEY_RED" mapto="red" flags="m" />
                <key id="KEY_INFO" mapto="info" flags="m" />
                <key id="KEY_MENU" mapto="input_date_time" flags="m" />
                <key id="KEY_CHANNELUP" mapto="nextBouquet" flags="m" />
index 1af2cbb933d353fb619a57f0d3dfd47c4094a168..331fe75e11b3233c1255fd7ab0c7b9171b0f99ea 100644 (file)
@@ -70,7 +70,7 @@ class EPGSelection(Screen):
                                "yellow": self.yellowButtonPressed,
                                "blue": self.blueButtonPressed,
                                "info": self.infoKeyPressed,
-                               "zapTo": self.zapTo,
+                               "red": self.zapTo,
                                "input_date_time": self.enterDateTime,
                                "nextBouquet": self.nextBouquet,
                                "prevBouquet": self.prevBouquet
@@ -153,16 +153,16 @@ class EPGSelection(Screen):
                                setEvent(cur[0])
 
        def zapTo(self): # just used in multiepg
-               if self.zapFunc != None:
-                       self.closeRecursive = True
-                       ref = self["list"].getCurrent()[1]
-                       self.zapFunc(ref.ref)
+               if self.zapFunc and self["key_red"].getText() == "Zap":
+                       lst = self["list"]
+                       count = lst.getCurrentChangeCount()
+                       if count == 0:
+                               self.closeRecursive = True
+                               ref = lst.getCurrent()[1]
+                               self.zapFunc(ref.ref)
 
        def eventSelected(self):
-               if self.type == EPG_TYPE_MULTI:
-                       self.zapTo()
-               else:
-                       self.infoKeyPressed()
+               self.infoKeyPressed()
 
        def yellowButtonPressed(self):
                if self.type == EPG_TYPE_MULTI:
@@ -208,13 +208,16 @@ class EPGSelection(Screen):
                        self["now_text"].hide()
                        self["next_text"].hide()
                        self["more_text"].hide()
+                       self["key_red"].setText("")
                else:
                        if state == 1:
+                               self["key_red"].setText("Zap")
                                self["now_button_sel"].show()
                                self["now_button"].hide()
                        else:
                                self["now_button"].show()
                                self["now_button_sel"].hide()
+                               self["key_red"].setText("")
 
                        if state == 2:
                                self["next_button_sel"].show()