use new ScrollLabel in EPG EventViewer
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 12 Nov 2005 18:09:21 +0000 (18:09 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 12 Nov 2005 18:09:21 +0000 (18:09 +0000)
data/keymap.xml
data/skin.xml
lib/python/Screens/EventView.py

index fa252fc..96f0276 100644 (file)
                <key id="KEY_INFO" mapto="showEPGList" flags="m" />
        </map>
        <map context="EventViewActions">
-               <key id="KEY_UP" mapto="scrollUp" flags="m" />
-               <key id="KEY_DOWN" mapto="scrollDown" flags="m" />
+               <key id="KEY_UP" mapto="pageUp" flags="m" />
+               <key id="KEY_DOWN" mapto="pageDown" flags="m" />
                <key id="KEY_LEFT" mapto="prevEvent" flags="m" />
                <key id="KEY_RIGHT" mapto="nextEvent" flags="m" />
        </map>
index 0d3c334..ef5bbd1 100644 (file)
                        <widget name="list" position="10,5" size="550,400" />
                </screen>
                <screen name="EventView" position="100,100" size="520,380" title="Eventview">
-                       <widget name="epg_description" position="10,5" size="480,335" font="Arial;22" />
+                       <widget name="epg_description" position="10,5" size="500,335" font="Arial;22" />
                        <widget name="datetime" position="10,345" size="130,30" font="Arial;22" />
                        <widget name="duration" position="140,345" size="100,30" font="Arial;22" />
                        <widget name="channel" position="240,345" size="270,30" font="Arial;22" />
-                       <widget name="scrollbar" position="490,5" size="20,335" orientation="orVertical" />
                </screen>
                <screen name="MovieSelection" position="150,100" size="400,420" title="Select-a-movie">
                        <widget name="list" position="0,50" size="400,300" />
index 48d85bf..6dfb389 100644 (file)
@@ -1,28 +1,23 @@
 from Screen import Screen
 from Components.ActionMap import ActionMap
 from Components.Label import Label
-from Components.ProgressBar import ProgressBar
+from Components.ScrollLabel import ScrollLabel
 from enigma import eWidget, eServiceEventPtr, eLabel
 
 class EventView(Screen):
-       def __init__(self, session, Event, callback):
+       def __init__(self, session, Event, callback=None):
                Screen.__init__(self, session)
-
                self.cbFunc = callback
-               print self.cbFunc
-
-               self["epg_description"] = Label()
+               self["epg_description"] = ScrollLabel()
                self["datetime"] = Label()
                self["channel"] = Label()
-               self["scrollbar"] = ProgressBar()
                self["duration"] = Label()
-
                self["actions"] = ActionMap(["OkCancelActions", "EventViewActions"],
                        {
                                "cancel": self.close,
                                "ok": self.close,
-                               "scrollUp": self.scrollUp,
-                               "scrollDown": self.scrollDown,
+                               "pageUp": self.pageUp,
+                               "pageDown": self.pageDown,
                                "prevEvent": self.prevEvent,
                                "nextEvent": self.nextEvent
                        })
@@ -46,8 +41,8 @@ class EventView(Screen):
                self["channel"].setText("Unknown Service")
                self["duration"].setText("%d min"%(event.getDuration()/60))
 
-       def scrollUp(self):
-               print "scrollUp"
-
-       def scrollDown(self):
-               print "scrollDown"
+       def pageUp(self):
+               self["epg_description"].pageUp()
+       
+       def pageDown(self):
+               self["epg_description"].pageDown()