X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f677fd9a66325bcc27a97b5fca55f34d83cfbac9..03840de4f14dbbbbb6d4d38c862a0a1cceba5ea7:/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py b/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py index 51a3fb39..17abb0ff 100644 --- a/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py +++ b/lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py @@ -1,16 +1,12 @@ -from enigma import * +from enigma import RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, eTimer, gFont from Screens.Screen import Screen from Screens.MessageBox import MessageBox -from Components.ActionMap import ActionMap, NumberActionMap +from Components.ActionMap import ActionMap from Components.ScrollLabel import ScrollLabel -from Components.Label import Label -from Components.GUIComponent import * -from Components.MenuList import MenuList -from Components.Input import Input -from Screens.Console import Console +from Components.GUIComponent import GUIComponent from Plugins.Plugin import PluginDescriptor -import os +from os import popen class Upgrade(Screen): skin = """ @@ -43,7 +39,7 @@ class Upgrade(Screen): self.close() def doUpdateDelay(self): - lines = os.popen("ipkg update && ipkg upgrade -force-defaults -force-overwrite", "r").readlines() + lines = popen("ipkg update && ipkg upgrade -force-defaults -force-overwrite", "r").readlines() string = "" for x in lines: string += x @@ -58,15 +54,6 @@ class Upgrade(Screen): else: self.close() -RT_HALIGN_LEFT = 0 -RT_HALIGN_RIGHT = 1 -RT_HALIGN_CENTER = 2 -RT_HALIGN_BLOCK = 4 - -RT_VALIGN_TOP = 0 -RT_VALIGN_CENTER = 8 -RT_VALIGN_BOTTOM = 16 - def PacketEntryComponent(packet): res = [ packet ] @@ -122,13 +109,13 @@ class Ipkg(Screen): def fillPacketList(self): - lines = os.popen("ipkg list", "r").readlines() + lines = popen("ipkg list", "r").readlines() packetlist = [] for x in lines: split = x.split(' - ') packetlist.append([split[0].strip(), split[1].strip()]) - lines = os.popen("ipkg list_installed", "r").readlines() + lines = popen("ipkg list_installed", "r").readlines() installedlist = {} for x in lines: @@ -151,7 +138,7 @@ class Ipkg(Screen): self.close() def doUpdateDelay(self): - lines = os.popen("ipkg update && ipkg upgrade", "r").readlines() + lines = popen("ipkg update && ipkg upgrade", "r").readlines() string = "" for x in lines: string += x @@ -166,12 +153,12 @@ class Ipkg(Screen): else: self.close() -def UpgradeMain(session): +def UpgradeMain(session, **kwargs): session.open(Upgrade) -def IpkgMain(session): +def IpkgMain(session, **kwargs): session.open(Ipkg) -def Plugins(): +def Plugins(**kwargs): return [PluginDescriptor(name="Old Softwareupdate", description="Updates your receiver's software", icon="update.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=UpgradeMain), - PluginDescriptor(name="IPKG", description="IPKG frotend", icon="update.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=IpkgMain)] + PluginDescriptor(name="IPKG", description="IPKG frontend", icon="update.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=IpkgMain)]