some work on DVB-T
[enigma2.git] / lib / python / Screens / Console.py
index d13729f86500bcd8eacc7ea74ed43608df217094..98c373d5c2e94895449324654ddea8ee1a16354e 100644 (file)
@@ -10,7 +10,7 @@ class Console(Screen):
                        <widget name="text" position="0,0" size="550,400" font="Regular;15" />
                </screen>"""
                
-       def __init__(self, session, args = None):
+       def __init__(self, session, title = "Console", cmdlist = None):
                self.skin = Console.skin
                Screen.__init__(self, session)
 
@@ -23,7 +23,10 @@ class Console(Screen):
                        "down": self["text"].pageDown
                }, -1)
                
-               self.cmdlist = args
+               self.cmdlist = cmdlist
+               self.newtitle = title
+               
+               self.onShown.append(self.updateTitle)
                
                self.container = eConsoleAppContainer()
                self.run = 0
@@ -31,8 +34,12 @@ class Console(Screen):
                self.container.dataAvail.get().append(self.dataAvail)
                self.onLayoutFinish.append(self.startRun) # dont start before gui is finished
 
+       def updateTitle(self):
+               self.setTitle(self.newtitle)
+
        def startRun(self):
                self["text"].setText(_("Execution Progress:") + "\n\n")
+               print "Console: executing in run", self.run, " the command:", self.cmdlist[self.run]
                self.container.execute(self.cmdlist[self.run])
 
        def runFinished(self, retval):