fixes bug #273
authorthedoc <thedoc@atom.(none)>
Wed, 23 Dec 2009 20:57:24 +0000 (21:57 +0100)
committerthedoc <thedoc@atom.(none)>
Wed, 23 Dec 2009 21:00:11 +0000 (22:00 +0100)
add a quick shortcut to switch to "nothing connected" in the sat config screen for remote debugging purposes (undocumented)

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

index 25538f87f4f161a3cdfe9045041b6f1c7539911e..9461d509fc3f5708645473a49226afd738d945b6 100755 (executable)
                <key id="KEY_BLUE" mapto="extensions" flags="b" />
        </map>
        
+       <map context="SatlistShortcutAction">
+               <key id="KEY_BLUE" mapto="nothingconnected" flags="b" />
+       </map>
+       
        <map context="InfobarChannelSelection">
                <key id="KEY_LEFT" mapto="zapUp" flags="mr" />
                <key id="KEY_RIGHT" mapto="zapDown" flags="mr" />
index 634d231af896bce5a34573f05f9eade96975f9be..d5249b99941512c0e27370b625b27e51b315b326 100644 (file)
@@ -5,7 +5,8 @@ from Components.ActionMap import ActionMap
 from Components.ConfigList import ConfigListScreen
 from Components.MenuList import MenuList
 from Components.NimManager import nimmanager
-from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement
+from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement,\
+       ConfigSatlist
 from Components.Sources.List import List
 from Screens.MessageBox import MessageBox
 from Screens.ChoiceBox import ChoiceBox
@@ -383,10 +384,11 @@ class NimSetup(Screen, ConfigListScreen):
 
                ConfigListScreen.__init__(self, self.list)
 
-               self["actions"] = ActionMap(["SetupActions"],
+               self["actions"] = ActionMap(["SetupActions", "SatlistShortcutAction"],
                {
                        "ok": self.keySave,
                        "cancel": self.keyCancel,
+                       "nothingconnected": self.nothingConnectedShortcut
                }, -2)
 
                self.slotid = slotid
@@ -423,6 +425,11 @@ class NimSetup(Screen, ConfigListScreen):
                # we need to call saveAll to reset the connectedTo choices
                self.saveAll()
                self.close()
+               
+       def nothingConnectedShortcut(self):
+               if type(self["config"].getCurrent()[1]) is ConfigSatlist:
+                       self["config"].getCurrent()[1].setValue("3601")
+                       self["config"].invalidateCurrent()
                        
 class NimSelection(Screen):
        def __init__(self, session):