From c1311444ea249a45d0eceefa15d77fce410a54da Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sun, 11 Dec 2005 22:58:36 +0000 Subject: add some translations (translations in the wizard don't work in some places) remove every moving pixmap from the startwizard (because of flickering) --- lib/python/Components/LanguageList.py | 6 +++--- lib/python/Screens/LanguageSelection.py | 2 +- lib/python/Screens/StartWizard.py | 2 ++ lib/python/Screens/Wizard.py | 10 ++++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/LanguageList.py b/lib/python/Components/LanguageList.py index 23f78003..def29c93 100644 --- a/lib/python/Components/LanguageList.py +++ b/lib/python/Components/LanguageList.py @@ -18,11 +18,11 @@ RT_VALIGN_BOTTOM = 16 def LanguageEntryComponent(file, name): res = [ None ] - res.append((70, 0, 400, 40, 0, RT_VALIGN_CENTER, name)) + res.append((80, 10, 200, 50, 0, RT_HALIGN_LEFT , name)) png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/countries/" + file + ".png")) if png == None: png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "/countries/missing.png")) - res.append((0, 5, 60, 40, png)) + res.append((10, 5, 60, 40, png)) return res @@ -33,7 +33,7 @@ class LanguageList(HTMLComponent, GUIComponent, MenuList): self.l = eListboxPythonMultiContent() self.list = list self.l.setList(list) - self.l.setFont(0, gFont("Arial", 25)) + self.l.setFont(0, gFont("Arial", 20)) def GUIcreate(self, parent): self.instance = eListbox(parent) diff --git a/lib/python/Screens/LanguageSelection.py b/lib/python/Screens/LanguageSelection.py index a53bb97e..e845d84b 100644 --- a/lib/python/Screens/LanguageSelection.py +++ b/lib/python/Screens/LanguageSelection.py @@ -17,7 +17,7 @@ class LanguageSelection(Screen): else: for x in language.lang: self.list.append(LanguageEntryComponent(x[2], x[0])) - + self["list"] = LanguageList(self.list) self["actions"] = ActionMap(["OkCancelActions"], diff --git a/lib/python/Screens/StartWizard.py b/lib/python/Screens/StartWizard.py index 1cb0bd89..037c0757 100644 --- a/lib/python/Screens/StartWizard.py +++ b/lib/python/Screens/StartWizard.py @@ -14,6 +14,7 @@ class StartWizard(Wizard): + """ def __init__(self, session): @@ -24,6 +25,7 @@ class StartWizard(Wizard): self["rc"] = MovingPixmap() self["arrowdown"] = MovingPixmap() self["arrowup"] = MovingPixmap() + self["arrowup2"] = MovingPixmap() wizardManager.registerWizard(LanguageSelection) wizardManager.registerWizard(StartWizard) \ No newline at end of file diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index e4f69290..a5726f6f 100644 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -78,7 +78,7 @@ class Wizard(Screen, HelpableScreen): self["actions"] = NumberActionMap(["WizardActions", "NumberActions"], { "ok": self.ok, - #"cancel": self.keyCancel, + "back": self.back, "left": self.left, "right": self.right, "up": self.up, @@ -100,6 +100,12 @@ class Wizard(Screen, HelpableScreen): #"ok": (self.ok, _("Close this Screen...")), #}) + def back(self): + self.currStep -= 1 + if self.currStep < 1: + self.currStep = 1 + self.updateValues() + def ok(self): print "OK" if (self.wizard[self.currStep]["config"]["screen"] != None): @@ -171,7 +177,7 @@ class Wizard(Screen, HelpableScreen): if (len(self.wizard[self.currStep]["list"]) > 0): self["list"].instance.setZPosition(2) for x in self.wizard[self.currStep]["list"]: - self.list.append((x[0], None)) + self.list.append((_(x[0]), None)) self["list"].l.setList(self.list) self["config"].instance.setZPosition(1) -- cgit v1.2.3