bouquet +/- is now working in the channellist
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 24 Jan 2006 22:48:05 +0000 (22:48 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 24 Jan 2006 22:48:05 +0000 (22:48 +0000)
data/keymap.xml
lib/python/Screens/ChannelSelection.py

index a737ab2..1e6fbd5 100644 (file)
                <key id="KEY_GREEN" mapto="showSatellites" flags="m" />
                <key id="KEY_YELLOW" mapto="showProviders" flags="m" />
                <key id="KEY_BLUE" mapto="showFavourites" flags="m" />
+               <key id="KEY_CHANNELUP" mapto="nextBouquet" flags="m" />
+               <key id="KEY_CHANNELDOWN" mapto="prevBouquet" flags="m" />
        </map>
 
        <map context="ChannelSelectEPGActions">
index 43cf66d..4c8b248 100644 (file)
@@ -377,6 +377,8 @@ class ChannelSelectionBase(Screen):
                                "showAllServices": self.showAllServices,
                                "showProviders": self.showProviders,
                                "showSatellites": self.showSatellites,
+                               "nextBouquet": self.nextBouquet,
+                               "prevBouquet": self.prevBouquet,
                                "1": self.keyNumberGlobal,
                                "2": self.keyNumberGlobal,
                                "3": self.keyNumberGlobal,
@@ -591,6 +593,23 @@ class ChannelSelectionBase(Screen):
                                                self.clearPath()
                                                self.enterPath(ref)
 
+       def changeBouquet(self, direction):
+               if not self.pathChangedDisabled:
+                       if self.isBasePathEqual(self.bouquet_root):
+                               self.pathUp()
+                               if direction < 0:
+                                       self.moveUp()
+                               else:
+                                       self.moveDown()
+                               ref = self.getCurrentSelection()
+                               self.enterPath(ref)
+
+       def nextBouquet(self):
+               self.changeBouquet(+1)
+
+       def prevBouquet(self):
+               self.changeBouquet(-1)
+
        def showFavourites(self):
                if not self.pathChangedDisabled:
                        if not self.preEnterPath(self.bouquet_rootstr):