- improved scan error handling
[enigma2.git] / screens.py
index a0d0d7f..fe8d69d 100644 (file)
@@ -83,14 +83,6 @@ class mainMenu(Screen):
                                ("wie spaet ists?!", self.goClock)
                        ])
 
-#class mainMenu(Screen):
-#      def __init__(self):
-#              GUISkin.__init__(self)
-#              
-#              self["title"] = Header("this is the\nMAIN MENU !!!");
-#              self["okbutton"] = Button("ok")
-#              self["okbutton"].onClick = [ self.close ]
-
 class channelSelection(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
@@ -170,9 +162,13 @@ class clockDisplay(Screen):
 
 class serviceScan(Screen):
        def ok(self):
+               print "ok"
                if self["scan"].isDone():
                        self.close()
        
+       def cancel(self):
+               print "cancel not yet implemented ;)"
+       
        def __init__(self, session):
                Screen.__init__(self, session)
                
@@ -180,5 +176,9 @@ class serviceScan(Screen):
                self["scan_state"] = Label("scan state")
                self["scan"] = ServiceScan(self["scan_progress"], self["scan_state"])
 
-               self["okbutton"] = Button("ok", [self.ok])
-               self["okbutton"].disable()
+               self["actions"] = ActionMap(["OkCancelActions"], 
+                       {
+                               "ok": self.ok,
+                               "cancel": self.cancel
+                       })
+