fix directory browser + implement changelog viewer
[enigma2.git] / lib / python / Screens / Setup.py
index 35918b5b612e8a50321da775b8adbc27307237fc..7226562fd5a5431865ac58d874513526b0beb756 100644 (file)
@@ -19,6 +19,13 @@ except:
 setupdom = xml.etree.cElementTree.parse(setupfile)
 setupfile.close()
 
+class SetupError(Exception):
+    def __init__(self, message):
+        self.msg = message
+
+    def __str__(self):
+        return self.msg
+
 class SetupSummary(Screen):
        skin = """
        <screen position="6,0" size="120,64">
@@ -28,11 +35,10 @@ class SetupSummary(Screen):
        </screen>"""
 
        def __init__(self, session, parent):
-               Screen.__init__(self, session)
+               Screen.__init__(self, session, parent = parent)
                self["SetupTitle"] = Label(_(parent.setup_title))
                self["SetupEntry"] = Label("")
                self["SetupValue"] = Label("")
-               self.parent = parent
                self.onShow.append(self.addWatcher)
                self.onHide.append(self.removeWatcher)
                
@@ -145,4 +151,4 @@ def getSetupTitle(id):
        for x in xmldata.findall("setup"):
                if x.get("key") == id:
                        return x.get("title", "").encode("UTF-8")
-       raise "unknown setup id '%s'!" % repr(id)
+       raise SetupError("unknown setup id '%s'!" % repr(id))