aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/update.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-06 15:48:47 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-01-06 15:48:47 +0000
commitbb438bec17665a907c28ca47d665766c7b26be79 (patch)
tree498dd3e71e349dc5845cdb5e48312c166328c0dd /lib/python/Plugins/update.py
parenteec9fe4a7e1381ee158c75431bc5fdd685b8f552 (diff)
downloadenigma2-bb438bec17665a907c28ca47d665766c7b26be79.tar.gz
enigma2-bb438bec17665a907c28ca47d665766c7b26be79.zip
plugins can register their own menu now
menus have their own id now the update plugin for example adds a menu item to the Setup menu with the id "setup"
Diffstat (limited to 'lib/python/Plugins/update.py')
-rw-r--r--lib/python/Plugins/update.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/python/Plugins/update.py b/lib/python/Plugins/update.py
index d05d317e..e69de29b 100644
--- a/lib/python/Plugins/update.py
+++ b/lib/python/Plugins/update.py
@@ -1,62 +0,0 @@
-from enigma import *
-from Screens.Screen import Screen
-from Screens.MessageBox import MessageBox
-from Components.ActionMap import ActionMap
-from Components.Label import Label
-
-import os
-
-class Example(Screen):
- skin = """
- <screen position="100,100" size="550,400" title="IPKG upgrade..." >
- <widget name="text" position="0,0" size="550,400" font="Regular;15" />
- </screen>"""
-
- def __init__(self, session):
- self.skin = Example.skin
- Screen.__init__(self, session)
-
- self["text"] = Label(_("Please press OK!"))
-
- self["actions"] = ActionMap(["WizardActions"],
- {
- "ok": self.go,
- "back": self.close
- }, -1)
-
- self.update = True
- self.delayTimer = eTimer()
- self.delayTimer.timeout.get().append(self.doUpdateDelay)
-
- def go(self):
- if self.update:
- self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
- else:
- self.close()
-
- 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)
- self.update = False
-
-
- def doUpdate(self, val = False):
- if val == True:
- self["text"].setText(_("Updating... Please wait... This can take some minutes..."))
- self.delayTimer.start(0, 1)
- else:
- self.close()
-
-
-def main(session):
- session.open(Example)
-
-
-def getPicturePath():
- return "/usr/lib/enigma2/python/Plugins/update.png"
-
-def getPluginName():
- return "Softwareupdate" \ No newline at end of file