add NumberActionMap for better input of numbers
[enigma2.git] / lib / python / Components / config.py
index 7f8f50727c166bbf50ab99a0c8e1585a5f3b6c43..5a92f076834f8439ab97d241f224ace4f0ae7ed8 100644 (file)
@@ -37,7 +37,9 @@ class configFile:
                        
                fileHandle = open("config", "w")
                
-               for x in self.configElements:
+               keys = self.configElements.keys()
+               keys.sort()
+               for x in keys:
                        wstr = x + "=" + self.configElements[x]
                        
                        if wstr[len(wstr) - 1] != '\n':
@@ -116,8 +118,7 @@ class configSequence:
                self.markedPos = 0
                
        def checkValues(self):
-               maxPos = len(self.parent.value) * self.parent.vals[1] 
-               print maxPos
+               maxPos = len(self.parent.value) * len(self.parent.vals[1]) + len(self.parent.value)
                        
                if self.markedPos >= maxPos:
                        self.markedPos = maxPos - 1
@@ -334,3 +335,15 @@ class configElement:
                self.loadData()
        def save(self):
                configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value))
+
+class configElement_nonSave(configElement):
+       def __init__(self, configPath, control, defaultValue, vals):
+               configElement.__init__(self, configPath, control, defaultValue, vals)
+
+       def save(self):
+               pass
+               
+def getConfigListEntry(description, element):
+       b = element
+       item = b.controlType(b)
+       return ((description, item))
\ No newline at end of file