- allow custom skin for setup as "GrowleeConfiguration", else fall back to new "Setup...
authorMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Wed, 14 Oct 2009 13:27:49 +0000 (13:27 +0000)
committerMoritz Venn <ritzmo@users.schwerkraft.elitedvb.net>
Wed, 14 Oct 2009 13:27:49 +0000 (13:27 +0000)
- bump required e2 version accordingly

growlee/CONTROL/control
growlee/src/plugin.py

index 4615d6e..3e31f5f 100644 (file)
@@ -6,5 +6,5 @@ Section: extra
 Priority: optional
 Maintainer: Moritz Venn <moritz.venn@freaque.net>
 Homepage: http://www.ritzmo.de
-Depends: enigma2(>=2.6git20090615), twisted
+Depends: enigma2(>=2.6git20091014), twisted
 Source: http://enigma2-plugins.schwerkraft.elitedvb.net/
index e3e773b..d598549 100644 (file)
@@ -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 = """<screen title="Growlee Configuration" position="center,center" size="565,280">
-               <widget name="config" position="5,5" size="555,100" scrollbarMode="showOnDemand" />
-       </screen>"""
-
        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]