1 from components import *
6 screen["clock"] = Clock()
8 class Screen(dict, HTMLSkin, GUISkin):
11 # never call this directly - it will be called from the session!
15 def close(self, retval=None):
18 class mainMenu(Screen):
21 self["title"].setText("EMUs ARE ILLEGAL AND NOT SUPPORTED!")
23 def goTimeshift(self):
24 self["title"].setText("JUST PRESS THE YELLOW BUTTON!")
27 self["title"].setText("HDTV GREEN FLASHES: ENABLED")
30 self.session.open(clockDisplay(Clock()))
32 def okbuttonClick(self):
33 selection = self["menu"].getCurrent()
37 GUISkin.__init__(self)
40 b.onClick = [ self.okbuttonClick ]
42 self["title"] = Header("Main Menu! - press ok to leave!")
43 self["menu"] = MenuList(
45 ("EMU SETUP", self.goEmu),
46 ("TIMESHIFT SETUP", self.goTimeshift),
47 ("HDTV PIP CONFIG", self.goHDTV),
48 ("wie spaet ists?!", self.goClock)
51 #class mainMenu(Screen):
53 # GUISkin.__init__(self)
55 # self["title"] = Header("this is the\nMAIN MENU !!!");
56 # self["okbutton"] = Button("ok")
57 # self["okbutton"].onClick = [ self.close ]
59 class channelSelection(Screen):
61 GUISkin.__init__(self)
63 self["list"] = ServiceList()
64 self["list"].setRoot(eServiceReference("1:0:1:0:0:0:0:0:0:0:PREMIERE"))
66 self["okbutton"] = Button("ok", [self.channelSelected, self.close])
68 def channelSelected(self):
69 # print "channel selected!"
72 class infoBar(Screen):
74 GUISkin.__init__(self)
76 self["channelSwitcher"] = Button("switch Channel", [self.switchChannel])
77 self["okbutton"] = Button("mainMenu", [self.mainMenu])
80 self.session.open(mainMenu())
82 def switchChannel(self):
83 self.session.open(channelSelection())
85 # a clock display dialog
86 class clockDisplay(Screen):
90 def __init__(self, clock):
91 GUISkin.__init__(self)
92 self["theClock"] = clock
94 b.onClick = [ self.okbutton ]
96 self["title"] = Header("clock dialog: here you see the current uhrzeit!")