aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Screens')
-rw-r--r--lib/python/Screens/Console.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/python/Screens/Console.py b/lib/python/Screens/Console.py
index 82fc8d1c..98c373d5 100644
--- a/lib/python/Screens/Console.py
+++ b/lib/python/Screens/Console.py
@@ -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,6 +34,9 @@ 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]