get the file for the BlinkingPixmap from skin.xml
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 26 Nov 2005 03:00:38 +0000 (03:00 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 26 Nov 2005 03:00:38 +0000 (03:00 +0000)
data/skin.xml
lib/python/Components/BlinkingPixmap.py
lib/python/Components/Pixmap.py
lib/python/Screens/InfoBarGenerics.py

index b2ba569a2b302b0ceeb3c3be771e78743989508c..c0371d3e8c32f598b182a5b1305be3abc927ee51 100644 (file)
                <screen name="InfoBar" flags="wfNoBorder" position="0,380" size="720,148" title="InfoBar">
                        <ePixmap position="0,0" zPosition="1" size="720,148" pixmap="/usr/share/enigma2/info-bg.png" />
                                                
-                       <widget name="BlinkingPoint" position="430,35" size="20,20" />
+                       <widget name="BlinkingPoint" pixmap="/usr/share/enigma2/record.png" position="430,35" size="20,20" />
                        <widget name="ServiceName" position="69,25" size="427,26" valign="center" font="Arial;22" backgroundColor="#101258" />
                        <widget name="CurrentTime" position="575,10" size="90,30" backgroundColor="dark" font="Arial;19" />
                        <widget name="Event_Now_StartTime" position="210,68" size="60,22" font="Arial;20" backgroundColor="dark" />
index e34e91656e20d6d3c6ad6d77cd25d4f7a4a7c9be..1f2f42257c620cb63de4ec90d978759ce15bfefe 100644 (file)
@@ -11,12 +11,10 @@ class BlinkingPixmap(GUIComponent, Pixmap):
        SHOWN = 0
        HIDDEN = 1
        
-       def __init__(self, filename):
+       def __init__(self):
                Pixmap.__init__(self)
                GUIComponent.__init__(self)
                
-               self.filename = filename
-               
                self.state = self.SHOWN
                self.blinking = False
                
@@ -27,18 +25,18 @@ class BlinkingPixmap(GUIComponent, Pixmap):
        
                
        def createWidget(self, parent):
-               return self.getePixmap(parent, self.filename)
+               return self.getePixmap(parent)
 
        def removeWidget(self, w):
                pass
        
-       def showPoint(self):
-               print "Show point"
+       def showPixmap(self):
+               print "Show pixmap"
                self.state = self.SHOWN
                self.instance.show()
 
-       def hidePoint(self):
-               print "Hide point"
+       def hidePixmap(self):
+               print "Hide pixmap"
                self.state = self.HIDDEN
                self.instance.hide()
                
@@ -48,9 +46,9 @@ class BlinkingPixmap(GUIComponent, Pixmap):
        def blink(self):
                if self.blinking == True:
                        if (self.state == self.SHOWN):
-                               self.hidePoint()
+                               self.hidePixmap()
                        elif (self.state == self.HIDDEN):
-                               self.showPoint()
+                               self.showPixmap()
                        
        def startBlinking(self):
                self.blinking = True
@@ -59,12 +57,12 @@ class BlinkingPixmap(GUIComponent, Pixmap):
        def stopBlinking(self):
                self.blinking = False
                if (self.state == self.SHOWN):
-                       self.hidePoint()
+                       self.hidePixmap()
                self.timer.stop()
                
 class BlinkingPixmapConditional(BlinkingPixmap):
-       def __init__(self, filename):
-               BlinkingPixmap.__init__(self, filename)
+       def __init__(self):
+               BlinkingPixmap.__init__(self)
                
                self.setConnect(None)
                
index c97c0ab1645b2104d9b9265326b78a794e335c16..b6620d9ace5a8513dc79c053224dada66b77e715 100644 (file)
@@ -3,23 +3,22 @@ import skin
 from enigma import *
 
 class Pixmap:
-       """Pixmap can be used for components which use a pixmap"""
+       """Pixmap can be used for components which diplay a pixmap"""
        
        def __init__(self):
                self.instance = None
        
        def GUIcreate(self, parent):
                self.instance = self.createWidget(parent)
-               #self.instance.setText(self.message)
        
        def GUIdelete(self):
                self.removeWidget(self.instance)
                self.instance = None
        
-       def getePixmap(self, parent, filename):
-               pixmap = ePixmap(parent)
-               pixmap.setPixmapFromFile(filename)
-               return pixmap
+       def getePixmap(self, parent):
+               #pixmap = ePixmap(parent)
+               #pixmap.setPixmapFromFile(self.filename)
+               return ePixmap(parent)
        
        def removeWidget(self, instance):
                pass
index 3dc59cffd4ff639d86c43f3602f40b00cfdd26c1..ce2c0da5313e26ed38d3c59b00150039342043c4 100644 (file)
@@ -393,8 +393,8 @@ class InfoBarInstantRecord:
                        })
                self.recording = None
                
-               self["BlinkingPoint"] = BlinkingPixmapConditional("/usr/share/enigma2/record.png")
-               self.onShown.append(self["BlinkingPoint"].hidePoint)
+               self["BlinkingPoint"] = BlinkingPixmapConditional()
+               self.onShown.append(self["BlinkingPoint"].hidePixmap)
 
        def stopCurrentRecording(self): 
                self.session.nav.RecordTimer.removeEntry(self.recording)