jumping to an entry beginning with a character nearly works now
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index e101cd25ab7b4c4bc56a8fd214a5a7db560c1950..c1842796df28a327102c95644140adb40a6eec33 100644 (file)
@@ -6,7 +6,7 @@ from Components.config import configfile, configsequencearg
 from Components.config import config, configElement, ConfigSubsection, configSequence
 from ChannelSelection import ChannelSelection
 
-from Components.Pixmap import PixmapConditional
+from Components.Pixmap import Pixmap, PixmapConditional
 from Components.BlinkingPixmap import BlinkingPixmapConditional
 from Components.ServiceName import ServiceName
 from Components.EventInfo import EventInfo
@@ -20,6 +20,8 @@ from Screens.Mute import Mute
 from Screens.Standby import Standby
 from Screens.EventView import EventView
 
+from Tools import Notifications
+
 #from enigma import eTimer, eDVBVolumecontrol, quitMainloop
 from enigma import *
 
@@ -58,6 +60,8 @@ class InfoBarVolumeControl:
                config.audio.volume.save()
                
        def     volUp(self):
+               if (eDVBVolumecontrol.getInstance().isMuted()):
+                       self.volMute()
                eDVBVolumecontrol.getInstance().volumeUp()
                self.volumeDialog.instance.show()
                self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
@@ -65,6 +69,8 @@ class InfoBarVolumeControl:
                self.hideVolTimer.start(3000)
 
        def     volDown(self):
+               if (eDVBVolumecontrol.getInstance().isMuted()):
+                       self.volMute()
                eDVBVolumecontrol.getInstance().volumeDown()
                self.volumeDialog.instance.show()
                self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
@@ -512,4 +518,30 @@ class InfoBarAdditionalInfo:
                
                self["FormatActive"] = PixmapConditional()
                # TODO: get the info from c++ somehow
-               self["FormatActive"].setConnect(lambda: False)
\ No newline at end of file
+               self["FormatActive"].setConnect(lambda: False)
+               
+               self["ButtonRed"] = Pixmap()
+               self["ButtonRedText"] = Label(_("Record"))
+               self["ButtonGreen"] = Pixmap()
+               self["ButtonYellow"] = Pixmap()
+               self["ButtonBlue"] = Pixmap()
+
+class InfoBarNotifications:
+       def __init__(self):
+               self.onExecBegin.append(self.checkNotifications)
+               Notifications.notificationAdded.append(self.checkNotificationsIfExecing)
+       
+       def checkNotificationsIfExecing(self):
+               if self.execing:
+                       self.checkNotifications()
+
+       def checkNotifications(self):
+               if len(Notifications.notifications):
+                       n = Notifications.notifications[0]
+                       Notifications.notifications = Notifications.notifications[1:]
+                       print "open",n
+                       cb = n[0]
+                       if cb is not None:
+                               self.session.openWithCallback(cb, *n[1:])
+                       else:
+                               self.session.open(*n[1:])