fix for inconsistency when moving the selection while callback is not called
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 13 Nov 2005 11:00:18 +0000 (11:00 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sun, 13 Nov 2005 11:00:18 +0000 (11:00 +0000)
lib/python/Components/config.py
lib/python/Screens/TimerEntry.py

index 724db4d675a517fbdb2a468a203611ad0bbe7384..c433f01bb47b619240f9c5ce767457fa0861fbd0 100644 (file)
@@ -291,7 +291,8 @@ class configText:
                self.parent.save()
                
        def nextEntry(self):
-               self.parent.vals[1]()
+               print self.parent
+               self.parent.vals[1](self.parent.getConfigPath())
 
        def handleKey(self, key):
                #this will no change anything on the value itself
index 0c94c1700b580b14b13bb2a8ec2d8f551f2008bb..d8f44c91773115f0de9121f52709ffa33c5e32e8 100644 (file)
@@ -40,7 +40,7 @@ class TimerEntry(Screen):
             config.timerentry = ConfigSubsection()
 
             config.timerentry.type = configElement_nonSave("config.timerentry.type", configSelection, 0, ("once", "repeated"))
-            config.timerentry.description = configElement_nonSave("config.timerentry.description", configText, self.timer.description, (configText.extendableSize, self.keyRight))
+            config.timerentry.description = configElement_nonSave("config.timerentry.description", configText, self.timer.description, (configText.extendableSize, self.keyRightCallback))
 
             config.timerentry.repeated = configElement_nonSave("config.timerentry.repeated", configSelection, 0, ("daily", "weekly", "Mon-Fri", "user-defined"))
 
@@ -129,6 +129,12 @@ class TimerEntry(Screen):
         self["config"].handleKey(config.key["prevElement"])
         self.newConfig()
 
+    def keyRightCallback(self, configPath):
+        currentConfigPath = self["config"].getCurrent()[1].parent.getConfigPath()
+        # check if we are still on the same config entry
+        if (currentConfigPath == configPath):
+            self.keyRight()
+
     def keyRight(self):
         self["config"].handleKey(config.key["nextElement"])
         self.newConfig()