From d03b6b65a0f14bad9af7be5b6280488eb4049cb0 Mon Sep 17 00:00:00 2001 From: Moritz Venn Date: Wed, 14 Oct 2009 13:27:49 +0000 Subject: [PATCH] - allow custom skin for setup as "GrowleeConfiguration", else fall back to new "Setup" skin, - bump required e2 version accordingly --- growlee/CONTROL/control | 2 +- growlee/src/plugin.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/growlee/CONTROL/control b/growlee/CONTROL/control index 4615d6e..3e31f5f 100644 --- a/growlee/CONTROL/control +++ b/growlee/CONTROL/control @@ -6,5 +6,5 @@ Section: extra Priority: optional Maintainer: Moritz Venn Homepage: http://www.ritzmo.de -Depends: enigma2(>=2.6git20090615), twisted +Depends: enigma2(>=2.6git20091014), twisted Source: http://enigma2-plugins.schwerkraft.elitedvb.net/ diff --git a/growlee/src/plugin.py b/growlee/src/plugin.py index e3e773b..d598549 100644 --- a/growlee/src/plugin.py +++ b/growlee/src/plugin.py @@ -15,6 +15,7 @@ from Components.ActionMap import ActionMap from Components.config import config, getConfigListEntry, ConfigSubsection, \ ConfigText, ConfigPassword, ConfigYesNo from Components.ConfigList import ConfigListScreen +from Components.Sources.StaticText import StaticText config.plugins.growlee = ConfigSubsection() config.plugins.growlee.enable_incoming = ConfigYesNo(default=False) @@ -23,12 +24,13 @@ config.plugins.growlee.address = ConfigText(fixed_size=False) config.plugins.growlee.password = ConfigPassword() class GrowleeConfiguration(Screen, ConfigListScreen): - skin = """ - - """ - def __init__(self, session): Screen.__init__(self, session) + self.skinName = [ "GrowleeConfiguration", "Setup" ] + + # Buttons + self["key_red"] = StaticText(_("Cancel")) + self["key_green"] = StaticText(_("OK")) # Summary self.setup_title = "Growlee Configuration" @@ -37,7 +39,8 @@ class GrowleeConfiguration(Screen, ConfigListScreen): # Define Actions self["actions"] = ActionMap(["SetupActions"], { - "cancel": self.keySave, + "cancel": self.keyCancel, + "save": self.keySave, } ) @@ -58,10 +61,7 @@ class GrowleeConfiguration(Screen, ConfigListScreen): def changed(self): for x in self.onChangedEntry: - try: - x() - except: - pass + x() def getCurrentEntry(self): return self["config"].getCurrent()[0] -- 2.7.4