aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMladen Horvat <acid-burn@opendreambox.org>2011-04-13 23:12:10 +0200
committerMladen Horvat <acid-burn@opendreambox.org>2011-04-13 23:12:10 +0200
commit710962d4f216b12c7cc25a189cbcc890a2ab5622 (patch)
treebfe670f2dfc12d197d49af4b0d3e7fddf1db6510 /lib
parentc563ffd07163d5982fa4a3d8e9c2486f480b899a (diff)
downloadenigma2-710962d4f216b12c7cc25a189cbcc890a2ab5622.tar.gz
enigma2-710962d4f216b12c7cc25a189cbcc890a2ab5622.zip
Components/DreamInfoHandler.py, SystemPlugins/SoftwareManager: add possibility to have also non plugins/skins inside SoftwareManager.
add support for 'needsRestart' option inside meta descriptions for non plugins/skins. refs #389
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/Components/DreamInfoHandler.py4
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py2
-rw-r--r--lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py16
3 files changed, 15 insertions, 7 deletions
diff --git a/lib/python/Components/DreamInfoHandler.py b/lib/python/Components/DreamInfoHandler.py
index 8e9c29d1..8097365c 100755
--- a/lib/python/Components/DreamInfoHandler.py
+++ b/lib/python/Components/DreamInfoHandler.py
@@ -84,6 +84,8 @@ class InfoHandler(xml.sax.ContentHandler):
self.attributes["packagename"] = str(attrs["packagename"])
if attrs.has_key("packagetype"):
self.attributes["packagetype"] = str(attrs["packagetype"])
+ if attrs.has_key("needsRestart"):
+ self.attributes["needsRestart"] = str(attrs["needsRestart"])
if attrs.has_key("shortdescription"):
self.attributes["shortdescription"] = str(attrs["shortdescription"])
@@ -120,6 +122,8 @@ class InfoHandler(xml.sax.ContentHandler):
self.attributes["name"] = str(data)
if self.elements[-1] == "packagename":
self.attributes["packagename"] = str(data)
+ if self.elements[-1] == "needsRestart":
+ self.attributes["needsRestart"] = str(data)
if self.elements[-1] == "shortdescription":
self.attributes["shortdescription"] = str(data)
if self.elements[-1] == "description":
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
index 178efadc..ec2f82cc 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
@@ -244,7 +244,7 @@ class SoftwareTools(DreamInfoHandler):
if self.NetworkConnectionAvailable == True:
if not self.UpdateConsole:
self.UpdateConsole = Console()
- cmd = "opkg install enigma2-meta enigma2-plugins-meta enigma2-skins-meta"
+ cmd = "opkg install enigma2-meta enigma2-plugins-meta enigma2-skins-meta enigma2-drivers-meta"
self.UpdateConsole.ePopen(cmd, self.InstallMetaPackageCB, callback)
else:
self.InstallMetaPackageCB(True)
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
index f78b7582..12fd6094 100644
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
@@ -489,7 +489,6 @@ class SoftwareManagerInfo(Screen):
self.list = []
backupfiles = config.plugins.configurationbackup.backupdirs.value
for entry in backupfiles:
- print entry
self.list.append((entry,))
self['list'].setList(self.list)
@@ -569,6 +568,7 @@ class PluginManager(Screen, DreamInfoHandler):
self.currentSelectedIndex = None
self.currentSelectedPackage = None
self.saved_currentSelectedPackage = None
+ self.restartRequired = False
self.onShown.append(self.setWindowTitle)
self.onLayoutFinish.append(self.getUpdateInfos)
@@ -892,6 +892,8 @@ class PluginManager(Screen, DreamInfoHandler):
self.package = iSoftwareTools.packageDetails[0]
if self.package[0].has_key("attributes"):
self.attributes = self.package[0]["attributes"]
+ if self.attributes.has_key("needsRestart"):
+ self.restartRequired = True
if self.attributes.has_key("package"):
self.packagefiles = self.attributes["package"]
if plugin[1] == 'installed':
@@ -924,11 +926,11 @@ class PluginManager(Screen, DreamInfoHandler):
def runExecuteFinished(self):
self.reloadPluginlist()
- restartRequired = plugins.restartRequired
- if restartRequired:
+ if plugins.restartRequired or self.restartRequired:
self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
else:
self.selectedFiles = []
+ self.restartRequired = False
self.detailsClosed(True)
def ExecuteReboot(self, result):
@@ -936,6 +938,7 @@ class PluginManager(Screen, DreamInfoHandler):
quitMainloop(3)
else:
self.selectedFiles = []
+ self.restartRequired = False
self.detailsClosed(True)
def reloadPluginlist(self):
@@ -1174,7 +1177,7 @@ class PluginDetails(Screen, DreamInfoHandler):
self.package = self.packageDetails[0]
if self.package[0].has_key("attributes"):
self.attributes = self.package[0]["attributes"]
-
+ self.restartRequired = False
self.cmdList = []
self.oktext = _("\nAfter pressing OK, please wait!")
self.picload = ePicLoad()
@@ -1272,6 +1275,8 @@ class PluginDetails(Screen, DreamInfoHandler):
def go(self):
if self.attributes.has_key("package"):
self.packagefiles = self.attributes["package"]
+ if self.attributes.has_key("needsRestart"):
+ self.restartRequired = True
self.cmdList = []
if self.pluginstate in ('installed', 'remove'):
if self.packagefiles:
@@ -1293,8 +1298,7 @@ class PluginDetails(Screen, DreamInfoHandler):
def runUpgradeFinished(self):
self.reloadPluginlist()
- restartRequired = plugins.restartRequired
- if restartRequired:
+ if plugins.restartRequired or self.restartRequired:
self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
else:
self.close(True)