From 19822bed695288acea73fc9b3361c0c1f499c242 Mon Sep 17 00:00:00 2001 From: Stephan Reichholf Date: Tue, 10 Jun 2008 16:31:26 +0000 Subject: [PATCH] * add missing button graphics * make button-usage more consistent * context-associated label names --- webinterface/src/WebIfConfig.py | 75 ++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/webinterface/src/WebIfConfig.py b/webinterface/src/WebIfConfig.py index 07c4cdff..df3dc910 100644 --- a/webinterface/src/WebIfConfig.py +++ b/webinterface/src/WebIfConfig.py @@ -17,10 +17,15 @@ from Plugins.Extensions.WebInterface import addInterfaceConfig class WebIfConfigScreen(ConfigListScreen,Screen): skin = """ - - - - + + + + + + + + + """ def __init__(self, session, args = 0): self.session = session @@ -35,9 +40,9 @@ class WebIfConfigScreen(ConfigListScreen,Screen): c = config.plugins.Webinterface.interfaces[i] ConfigListScreen.__init__(self, self.list) - self["key_red"] = Button(_("cancel")) + self["key_red"] = Button(_("Cancel")) self["key_yellow"] = Button(_("Interfaces")) - self["key_green"] = Button(_("ok")) + self["key_green"] = Button(_("Ok")) self["setupActions"] = ActionMap(["SetupActions", "ColorActions"], { "yellow": self.openIfacesConfig, @@ -67,35 +72,39 @@ class WebIfConfigScreen(ConfigListScreen,Screen): class WebIfInterfaceListConfigScreen(Screen): skin = """ - - - - + + + + - - + + + + + + """ def __init__(self, session): Screen.__init__(self, session) - self["label1"] = Button(_("Adress")) - self["label2"] = Button(_("Port")) - self["label3"] = Button(_("use Authorization")) - self["label4"] = Button(_("disabled")) - self["key_red"] = Button(_("add")) - self["key_green"] = Button(_("edit")) + self["adress"] = Button(_("Adress")) + self["port"] = Button(_("Port")) + self["auth"] = Button(_("Use Authorization")) + self["disabled"] = Button(_("Disabled")) + self["key_red"] = Button(_("Add")) + self["key_yellow"] = Button(_("Change")) self["ifacelist"] = WebIfInterfaceList([]) self["actions"] = ActionMap(["WizardActions","MenuActions","ShortcutActions"], { - "ok": self.keyGreen, - "back": self.close, - "red": self.keyRed, - "green": self.keyGreen, - "yellow": self.keyYellow, - "up": self.up, - "down": self.down, - "left": self.left, - "right": self.right, + "ok" : self.keyGreen, + "back" : self.close, + "red" : self.keyRed, + "green" : self.keyGreen, + "yellow" : self.keyYellow, + "up" : self.up, + "down" : self.down, + "left" : self.left, + "right" : self.right, }, -1) self.updateList() @@ -127,12 +136,11 @@ class WebIfInterfaceListConfigScreen(Screen): def keyGreen(self): print "KEYGREEN" + + def keyYellow(self): x = self["ifacelist"].getCurrent()[0] print "current list index",x self.session.openWithCallback(self.updateList,WebIfInterfaceConfigScreen,int(x)) - - def keyYellow(self): - print "KEYYellow" def up(self): self["ifacelist"].up() @@ -163,12 +171,11 @@ class WebIfInterfaceConfigScreen(Screen, ConfigListScreen): - - + + - """ @@ -184,7 +191,7 @@ class WebIfInterfaceConfigScreen(Screen, ConfigListScreen): self["key_red"] = Button(_("Cancel")) self["key_green"] = Button(_("OK")) - self["key_yellow"] = Button("") + #self["key_yellow"] = Button("") self["key_blue"] = Button(_("Delete")) if ifacenum is None: -- 2.20.1