from Screen import Screen
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
-from Components.Label import Label
+from Components.Label import *
from Components.config import configfile, configsequencearg
from Components.config import config, configElement, ConfigSubsection, configSequence
from ChannelSelection import ChannelSelection
self["ButtonRed"] = Pixmap()
self["ButtonRedText"] = Label(_("Record"))
- self["ButtonGreen"] = Pixmap()
- self["ButtonGreenText"] = Label(_("Subservices"))
-# self["ButtonGreenText"].hide()
-# self["ButtonGreen"].hidePixmap()
-# self["ButtonYellow"] = Pixmap()
-# self["ButtonBlue"] = Pixmap()
+
+ self["ButtonGreen"] = PixmapConditional()
+ self["ButtonGreen"].setConnect(lambda: self.session.nav.getCurrentService().subServices().getNumberOfSubservices() > 0)
+ self["ButtonGreenText"] = LabelConditional(text = _("Subservices"), withTimer = True)
+ self["ButtonGreenText"].setConnect(lambda: self.session.nav.getCurrentService().subServices().getNumberOfSubservices() > 0)
+
+ self["ButtonYellow"] = PixmapConditional()
+ self["ButtonYellow"].setConnect(lambda: False)
+
+ self["ButtonBlue"] = PixmapConditional()
+ self["ButtonBlue"].setConnect(lambda: False)
class InfoBarNotifications:
def __init__(self):