add getTranslation method to wizard baseclass to allow overwriting this method for...
[enigma2.git] / lib / python / Screens / SimpleSummary.py
index bb3e1e3806615056220021ca550bc3784d951947..41875641aa1813602801c1b43b2a791044cc1aac 100644 (file)
@@ -1,17 +1,29 @@
 from Screens.Screen import Screen
+#from Components.Sources.Source import ObsoleteSource
 
 class SimpleSummary(Screen):
        skin = """
        <screen position="0,0" size="132,64">
-               <widget name="Clock" position="50,46" size="82,18" font="Regular;16" />
-               <widget name="Title" position="0,4" size="132,42" font="Regular;18" />
+               <widget source="global.CurrentTime" render="Label" position="56,46" size="82,18" font="Regular;16">
+                       <convert type="ClockToText">WithSeconds</convert>
+               </widget>
+               <widget name="Title" position="6,4" size="120,42" font="Regular;18" />
        </screen>"""
-       def __init__(self, session, root_screen):
+       def __init__(self, session, parent):
                from Components.Label import Label
-               from Components.Clock import Clock
-               Screen.__init__(self, session)
-               self["Clock"] = Clock()
-               self["Title"] = Label(root_screen.title)
+               Screen.__init__(self, session, parent = parent)
+
+               names = parent.skinName
+               if not isinstance(names, list):
+                 names = [names]
+
+               self.skinName = [ x + "_summary" for x in names ]
+               self.skinName.append("SimpleSummary")
+
+               # if parent has a "skin_summary" defined, use that as default
+               self.skin = parent.__dict__.get("skin_summary", self.skin)
+
+               self["Title"] = Label(parent.title or "")
 
        def setTitle(self, title):
                self["Title"].setText(title)