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 b2ba569..c0371d3 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 e34e916..1f2f422 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 c97c0ab..b6620d9 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 3dc59cf..ce2c0da 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)