1 from components import *
3 from enigma import quitMainloop
7 screen["clock"] = Clock()
9 class Screen(dict, HTMLSkin, GUISkin):
12 # never call this directly - it will be called from the session!
16 def close(self, retval=None):
19 class mainMenu(Screen):
22 self["title"].setText("EMUs ARE ILLEGAL AND NOT SUPPORTED!")
24 def goTimeshift(self):
25 self["title"].setText("JUST PRESS THE YELLOW BUTTON!")
28 self["title"].setText("HDTV GREEN FLASHES: ENABLED")
31 self.session.open(serviceScan())
34 self.session.open(clockDisplay(Clock()))
36 def okbuttonClick(self):
37 selection = self["menu"].getCurrent()
41 GUISkin.__init__(self)
44 b.onClick = [ self.okbuttonClick ]
46 self["title"] = Header("Main Menu! - press ok to leave!")
47 self["menu"] = MenuList(
49 ("Close Main Menu", self.close),
50 ("Service Scan", self.goScan),
51 ("Quit", quitMainloop),
52 ("EMU SETUP", self.goEmu),
53 ("TIMESHIFT SETUP", self.goTimeshift),
54 ("HDTV PIP CONFIG", self.goHDTV),
55 ("wie spaet ists?!", self.goClock)
58 #class mainMenu(Screen):
60 # GUISkin.__init__(self)
62 # self["title"] = Header("this is the\nMAIN MENU !!!");
63 # self["okbutton"] = Button("ok")
64 # self["okbutton"].onClick = [ self.close ]
66 class channelSelection(Screen):
68 GUISkin.__init__(self)
70 self["list"] = ServiceList()
71 self["list"].setRoot(eServiceReference("1:0:1:0:0:0:0:0:0:0:PREMIERE"))
73 self["okbutton"] = Button("ok", [self.channelSelected, self.close])
75 def channelSelected(self):
76 self.session.nav.playService(self["list"].getCurrent())
79 class infoBar(Screen):
81 GUISkin.__init__(self)
83 self["channelSwitcher"] = Button("switch Channel", [self.switchChannel])
84 self["okbutton"] = Button("mainMenu", [self.mainMenu])
87 self.session.open(mainMenu())
89 def switchChannel(self):
90 self.session.open(channelSelection())
92 # a clock display dialog
93 class clockDisplay(Screen):
97 def __init__(self, clock):
98 GUISkin.__init__(self)
99 self["theClock"] = clock
101 b.onClick = [ self.okbutton ]
103 self["title"] = Header("clock dialog: here you see the current uhrzeit!")
106 class serviceScan(Screen):
108 if self["scan"].isDone():
112 GUISkin.__init__(self)
114 self["scan_progress"] = ProgressBar()
115 self["scan_state"] = Label("scan state")
116 self["scan"] = ServiceScan(self["scan_progress"], self["scan_state"])
118 self["okbutton"] = Button("ok", [self.ok])
119 self["okbutton"].disable()