plugins can register their own menu now
[enigma2.git] / lib / python / Plugins / update.py
index 01e986e8bd2e60466f68c170a127c948ff61d3f2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,51 +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.ok,
-                       "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!"))
-               
-       def doUpdate(self, val = False):
-               
-               if val:
-                       print "updating"
-                       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)
-               else:
-                       self.close()            
-               
-               
-def main(session):
-       session.open(Example)
-       
-
-def getPicturePath():
-               return ""
-
-def getPluginName():
-               return "Softwareupdate"
\ No newline at end of file