aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/ChannelSelection.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-05-05 23:38:38 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-05-05 23:38:38 +0000
commita4da9cccc2575c4bf299bde9594dad3e049ddf6a (patch)
tree3064290f3ab9cfebdcaba577dc98c610fcc78139 /lib/python/Screens/ChannelSelection.py
parent81ae5bd362286a852f0851043bfccf1c754f3152 (diff)
downloadenigma2-a4da9cccc2575c4bf299bde9594dad3e049ddf6a.tar.gz
enigma2-a4da9cccc2575c4bf299bde9594dad3e049ddf6a.zip
- split 2 (Screens)
Diffstat (limited to 'lib/python/Screens/ChannelSelection.py')
-rw-r--r--lib/python/Screens/ChannelSelection.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
new file mode 100644
index 00000000..fa2f9da5
--- /dev/null
+++ b/lib/python/Screens/ChannelSelection.py
@@ -0,0 +1,57 @@
+from Screen import Screen
+from Components.Button import Button
+from Components.ServiceList import ServiceList
+from Components.ActionMap import ActionMap
+
+from enigma import eServiceReference
+
+class ChannelSelection(Screen):
+ def __init__(self, session):
+ Screen.__init__(self, session)
+
+ self["key_red"] = Button("red")
+ self["key_green"] = Button("green")
+ self["key_yellow"] = Button("yellow")
+ self["key_blue"] = Button("blue")
+
+ self["list"] = ServiceList()
+ self["list"].setRoot(eServiceReference("""1:0:1:0:0:0:0:0:0:0:(provider=="ARD") && (type == 1)"""))
+
+ #self["okbutton"] = Button("ok", [self.channelSelected])
+
+ class ChannelActionMap(ActionMap):
+ def action(self, contexts, action):
+ if action[:7] == "bouquet":
+ print "setting root to " + action[8:]
+ self.csel["list"].setRoot(eServiceReference("1:0:1:0:0:0:0:0:0:0:" + action[8:]))
+ else:
+ ActionMap.action(self, contexts, action)
+
+ self["actions"] = ChannelActionMap(["ChannelSelectActions", "OkCancelActions"],
+ {
+ "cancel": self.close,
+ "ok": self.channelSelected,
+ "mark": self.doMark
+ })
+ self["actions"].csel = self
+
+ def doMark(self):
+ ref = self["list"].getCurrent()
+ if self["list"].isMarked(ref):
+ self["list"].removeMarked(ref)
+ else:
+ self["list"].addMarked(ref)
+
+ def channelSelected(self):
+ self.session.nav.playService(self["list"].getCurrent())
+ self.close()
+
+ #called from infoBar
+ def zapUp(self):
+ self["list"].moveUp()
+ self.session.nav.playService(self["list"].getCurrent())
+
+ def zapDown(self):
+ self["list"].moveDown()
+ self.session.nav.playService(self["list"].getCurrent())
+