aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Label.py5
-rw-r--r--lib/python/Components/ServiceName.py5
-rw-r--r--lib/python/Screens/InfoBar.py8
-rw-r--r--lib/python/Screens/InfoBarGenerics.py27
-rw-r--r--lib/python/Screens/Makefile.am2
-rw-r--r--lib/python/Screens/SubserviceSelection.py30
-rw-r--r--lib/python/Screens/__init__.py2
7 files changed, 70 insertions, 9 deletions
diff --git a/lib/python/Components/Label.py b/lib/python/Components/Label.py
index 7402d722..c2d57743 100644
--- a/lib/python/Components/Label.py
+++ b/lib/python/Components/Label.py
@@ -22,3 +22,8 @@ class Label(HTMLComponent, GUIComponent, VariableText):
s = self.instance.calculateSize()
return (s.width(), s.height())
+ def show(self):
+ self.instance.show()
+
+ def hide(self):
+ self.instance.hide()
diff --git a/lib/python/Components/ServiceName.py b/lib/python/Components/ServiceName.py
index 2e794d67..a9c0930a 100644
--- a/lib/python/Components/ServiceName.py
+++ b/lib/python/Components/ServiceName.py
@@ -17,8 +17,9 @@ class ServiceName(PerServiceDisplay):
if service is not None:
info = service.info()
if info is not None:
- self.setText(info.getName())
- setLCD(info.getName())
+ name = info.getName()
+ self.setText(name)
+ setLCD(name)
def stopEvent(self):
self.setText("");
diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py
index 45a0538b..cee385c1 100644
--- a/lib/python/Screens/InfoBar.py
+++ b/lib/python/Screens/InfoBar.py
@@ -12,7 +12,8 @@ from Tools.Notifications import AddNotificationWithCallback
from Screens.InfoBarGenerics import InfoBarVolumeControl, InfoBarShowHide, \
InfoBarPowerKey, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, \
InfoBarEPG, InfoBarEvent, InfoBarServiceName, InfoBarPVR, InfoBarInstantRecord, \
- InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish
+ InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \
+ InfoBarSubserviceSelection
from Screens.HelpMenu import HelpableScreen, HelpMenu
@@ -23,7 +24,8 @@ import time
class InfoBar(Screen, InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey,
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG,
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection,
- HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish):
+ HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish,
+ InfoBarSubserviceSelection):
def __init__(self, session):
Screen.__init__(self, session)
@@ -37,7 +39,7 @@ class InfoBar(Screen, InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey,
InfoBarVolumeControl, InfoBarShowHide, InfoBarPowerKey, \
InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, \
InfoBarEvent, InfoBarServiceName, InfoBarInstantRecord, InfoBarAudioSelection, \
- InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish:
+ InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection:
x.__init__(self)
self.helpList.append((self["actions"], "InfobarActions", [("showMovies", "Watch a Movie...")]))
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index ddfac4a0..f27cf40c 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -512,6 +512,26 @@ class InfoBarAudioSelection:
if n > 0:
self.session.open(AudioSelection, audio)
+from Screens.SubserviceSelection import SubserviceSelection
+
+class InfoBarSubserviceSelection:
+ def __init__(self):
+ self["SubserviceSelectionAction"] = HelpableActionMap(self, "InfobarSubserviceSelectionActions",
+ {
+ "subserviceSelection": (self.subserviceSelection, "Subservice list..."),
+ })
+
+ def subserviceSelection(self):
+ service = self.session.nav.getCurrentService()
+ subservices = service.subServices()
+ n = subservices.getNumberOfSubservices()
+ if n > 0:
+ self.session.openWithCallback(self.subserviceSelected, SubserviceSelection, subservices)
+
+ def subserviceSelected(self, service):
+ if not service is None:
+ self.session.nav.playService(service)
+
class InfoBarAdditionalInfo:
def __init__(self):
self["DolbyActive"] = PixmapConditional()
@@ -529,8 +549,11 @@ class InfoBarAdditionalInfo:
self["ButtonRed"] = Pixmap()
self["ButtonRedText"] = Label(_("Record"))
self["ButtonGreen"] = Pixmap()
- self["ButtonYellow"] = Pixmap()
- self["ButtonBlue"] = Pixmap()
+ self["ButtonGreenText"] = Label(_("Subservices"))
+# self["ButtonGreenText"].hide()
+# self["ButtonGreen"].hidePixmap()
+# self["ButtonYellow"] = Pixmap()
+# self["ButtonBlue"] = Pixmap()
class InfoBarNotifications:
def __init__(self):
diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am
index 20e0961b..71ee04f0 100644
--- a/lib/python/Screens/Makefile.am
+++ b/lib/python/Screens/Makefile.am
@@ -7,4 +7,4 @@ install_PYTHON = \
Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
AudioSelection.py InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \
- Dish.py
+ Dish.py SubserviceSelection.py
diff --git a/lib/python/Screens/SubserviceSelection.py b/lib/python/Screens/SubserviceSelection.py
new file mode 100644
index 00000000..a73cf0e4
--- /dev/null
+++ b/lib/python/Screens/SubserviceSelection.py
@@ -0,0 +1,30 @@
+from Screen import Screen
+from Components.ActionMap import ActionMap
+from Components.MenuList import MenuList
+from Components.Label import Label
+from enigma import eServiceReferencePtr, eServiceReference
+
+class SubserviceSelection(Screen):
+ def KeyOk(self):
+ selection = self["subservices"].getCurrent()
+ self.close(selection[1])
+ def Cancel(self):
+ self.close(None)
+ def __init__(self, session, subservices):
+ Screen.__init__(self, session)
+
+ self["actions"] = ActionMap(["OkCancelActions"],
+ {
+ "cancel": self.Cancel,
+ "ok": self.KeyOk,
+ })
+
+ self.subservices = subservices
+
+ tlist = []
+ n = subservices.getNumberOfSubservices()
+ for x in range(n):
+ i = subservices.getSubservice(x)
+ tlist.append((i.getName(), i))
+
+ self["subservices"] = MenuList(tlist)
diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py
index 0c6f1714..bb1428f1 100644
--- a/lib/python/Screens/__init__.py
+++ b/lib/python/Screens/__init__.py
@@ -4,4 +4,4 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu",
"TimerEdit", "Setup", "HarddiskSetup", "FixedMenu",
"Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py",
"EpgSelection", "EventView", "Standby", "ServiceInfo",
- "AudioSelection", "InfoBarGenerics", "HelpMenu", "Wizard"]
+ "AudioSelection", "SubserviceSelection", "InfoBarGenerics", "HelpMenu", "Wizard"]