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):
19 class testDialog(Screen):
20 def testDialogClick(self):
21 selection = self["menu"].getCurrent()
25 self.session.open(screens["mainMenu"]())
28 self["title"].setText("EMUs ARE ILLEGAL AND NOT SUPPORTED!")
30 def goTimeshift(self):
31 self["title"].setText("JUST PRESS THE YELLOW BUTTON!")
34 self["title"].setText("HDTV GREEN FLASHES: ENABLED")
37 self.session.open(screens["clockDisplay"](Clock()))
40 GUISkin.__init__(self)
42 b.onClick = [ self.testDialogClick ]
44 self["title"] = Header("Test Dialog - press ok to leave!")
45 # self["menu"] = MenuList(
47 # ("MAIN MENU", self.goMain),
48 # ("EMU SETUP", self.goEmu),
49 # ("TIMESHIFT SETUP", self.goTimeshift),
50 # ("HDTV PIP CONFIG", self.goHDTV),
51 # ("wie spaet ists?!", self.goClock)
53 self["menu"] = ServiceList()
55 self["menu"].setRoot(eServiceReference("2:0:1:0:0:0:0:0:0:0:/"))
57 class mainMenu(Screen):
59 GUISkin.__init__(self)
61 self["title"] = Header("this is the\nMAIN MENU !!!");
62 self["okbutton"] = Button("ok")
63 self["okbutton"].onClick = [ self.close ]
66 # a clock display dialog
67 class clockDisplay(Screen):
71 def __init__(self, clock):
72 GUISkin.__init__(self)
73 self["theClock"] = clock
75 b.onClick = [ self.okbutton ]
77 self["title"] = Header("clock dialog: here you see the current uhrzeit!")
79 # defined screens (evtl. kann man sich das sparen, ich seh den sinn gerade nicht mehr)
82 "testDialog": testDialog,
83 "clockDisplay": clockDisplay ,
84 "mainMenu": mainMenu }