aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-03 11:09:06 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-03 11:09:06 +0000
commit61ea204d226d23041b40248f3b2336fbb2f53b77 (patch)
treecb806aa9ad361e474552270a1e9f548929ba904a /lib/python/Plugins
parenta22d3f73478b27ed19f8e412ccf15fad033e7bd4 (diff)
downloadenigma2-61ea204d226d23041b40248f3b2336fbb2f53b77.tar.gz
enigma2-61ea204d226d23041b40248f3b2336fbb2f53b77.zip
update plugin is now very user friendly :)
Diffstat (limited to 'lib/python/Plugins')
-rw-r--r--lib/python/Plugins/update.py26
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/python/Plugins/update.py b/lib/python/Plugins/update.py
index b8ff6ec4..e919f383 100644
--- a/lib/python/Plugins/update.py
+++ b/lib/python/Plugins/update.py
@@ -20,20 +20,28 @@ class Example(Screen):
self["actions"] = ActionMap(["WizardActions"],
{
- "ok": self.ok,
+ "ok": self.go,
"back": self.close
}, -1)
- def ok(self):
- self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
+ self.delayTimer = eTimer()
+ self.delayTimer.timeout.get().append(self.doUpdateDelay)
+ def go(self):
+ self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
+
+ def doUpdateDelay(self):
+ lines = os.popen("ipkg update && ipkg upgrade", "r").readlines()
+ string = ""
+ for x in lines:
+ string += x
+ self["text"].setText(_("Updating finished. Here is the result:") + "\n\n" + string)
+
+
def doUpdate(self, val = False):
- if val:
- lines = os.popen("ipkg update && ipkg upgrade", "r").readlines()
- string = ""
- for x in lines:
- string += x
- self["text"].setText(_("Updating finished. Here is the result:") + "\n\n" + string)
+ if val == True:
+ self["text"].setText(_("Updating... Please wait... This can take some minutes..."))
+ self.delayTimer.start(0, 1)
else:
self.close()