add enigma1 like radio mode (on/off switchable in usage setup)
[enigma2.git] / lib / python / Components / config.py
index 51ac7606f0de6da5c667f349e65da9b7a153adf9..4217202102561c4f3cfceacfea816a9047420884 100644 (file)
@@ -38,6 +38,18 @@ class configFile:
                else:
                        self.configElements[key] = value
 
+       def getResolvedKey(self, key):
+               str = self.configElements[key]
+               if len(str):
+                       pos = str.find('*')
+                       if pos != -1:
+                               str = str[pos+1:]
+                               pos = str.find('*')
+                               if pos != -1:
+                                       return str[:pos]
+                       return str
+               return None
+
        def save(self):
                if self.changed == 0:           #no changes, so no write to disk needed
                        return
@@ -95,7 +107,7 @@ class configSelection:
 
                returnValue = _(self.parent.vals[self.parent.value])
                if not isinstance(returnValue, str):
-                       returnValue = returnValue[0]
+                       returnValue = returnValue[1]
 
                # FIXME: it's not really nice to translate this here.
                # however, configSelections are persistent.