add support for cyclic garbage collection to eTimer and eSocketNotifier
[vuplus_dvbapp] / lib / python / Components / Pixmap.py
index 211b772..f6ecaf0 100644 (file)
@@ -1,21 +1,10 @@
-from ConditionalWidget import *
+from ConditionalWidget import ConditionalWidget
+from GUIComponent import GUIComponent
 
-from enigma import *
+from enigma import ePixmap, eTimer
 
-class Pixmap(Widget):
-       def __init__(self):
-               Widget.__init__(self)
-
-       def getePixmap(self, parent):
-               #pixmap = ePixmap(parent)
-               #pixmap.setPixmapFromFile(self.filename)
-               return ePixmap(parent)
-       
-       def createWidget(self, parent):
-               return self.getePixmap(parent)
-
-       def removeWidget(self, w):
-               pass
+class Pixmap(GUIComponent):
+       GUI_WIDGET = ePixmap
 
 class PixmapConditional(ConditionalWidget, Pixmap):
        def __init__(self, withTimer = True):
@@ -35,7 +24,7 @@ class MovingPixmap(Pixmap):
                self.clearPath()
                
                self.moveTimer = eTimer()
-               self.moveTimer.timeout.get().append(self.doMove)
+               self.moveTimer.callback.append(self.doMove)
                
        def clearPath(self, repeated = False):
                if (self.moving):