select active language in language selection screen
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 20 Feb 2006 14:57:17 +0000 (14:57 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Mon, 20 Feb 2006 14:57:17 +0000 (14:57 +0000)
data/skin.xml
lib/python/Screens/LanguageSelection.py

index 6a60764..f12d27b 100644 (file)
@@ -80,7 +80,7 @@
                        <widget name="canceltext" position="240,240" size="100,30" valign="center" halign="center" zPosition="2" font="Regular;20" transparent="1" />
                </screen>
                <screen name="LanguageSelection" position="200,125" size="220,250" title="Language selection">
                        <widget name="canceltext" position="240,240" size="100,30" valign="center" halign="center" zPosition="2" font="Regular;20" transparent="1" />
                </screen>
                <screen name="LanguageSelection" position="200,125" size="220,250" title="Language selection">
-                       <widget name="list" position="10,0" size="190,240" scrollbarMode="showOnDemand" />
+                       <widget name="list" position="10,0" size="190,250" scrollbarMode="showOnDemand" />
                </screen>
                <screen name="PluginBrowser" position="100,125" size="400,350" title="Plugin browser">
                        <widget name="list" position="10,0" size="380,340" scrollbarMode="showOnDemand" />
                </screen>
                <screen name="PluginBrowser" position="100,125" size="400,350" title="Plugin browser">
                        <widget name="list" position="10,0" size="380,340" scrollbarMode="showOnDemand" />
index 4185737..f59c798 100644 (file)
@@ -14,7 +14,8 @@ class LanguageSelection(Screen):
                self.list = []
                self["list"] = LanguageList(self.list)
                self.updateList()
                self.list = []
                self["list"] = LanguageList(self.list)
                self.updateList()
-               
+               self.onLayoutFinish.append(self.selectActiveLanguage)
+                               
                self["actions"] = ActionMap(["OkCancelActions", "DirectionActions"], 
                {
                        "ok": self.save,
                self["actions"] = ActionMap(["OkCancelActions", "DirectionActions"], 
                {
                        "ok": self.save,
@@ -25,6 +26,9 @@ class LanguageSelection(Screen):
                        "right": self.right
                }, -1)
                
                        "right": self.right
                }, -1)
                
+       def selectActiveLanguage(self):
+               self["list"].instance.moveSelectionTo(language.activeLanguage)
+               
        def save(self):
                self.run()
                self.close()
        def save(self):
                self.run()
                self.close()