aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
diff options
context:
space:
mode:
authoracid-burn <acid-burn@opendreambox.org>2011-02-07 14:34:11 +0100
committeracid-burn <acid-burn@opendreambox.org>2011-02-07 14:40:36 +0100
commit89e103f1ff262950613b761fcb370f8ab7267ee8 (patch)
tree43fe106de21a2aaff6d81faf110255bc91e9b84c /lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
parent367c104e1d3716861c87905575d0bc729342d79c (diff)
downloadenigma2-89e103f1ff262950613b761fcb370f8ab7267ee8.tar.gz
enigma2-89e103f1ff262950613b761fcb370f8ab7267ee8.zip
SoftwareManager: ask for restart after installation inside pluginmanager only if a restart is required.
refs #670
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py')
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py47
1 files changed, 24 insertions, 23 deletions
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
index 480707d0..4ee9b498 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
@@ -809,6 +809,8 @@ class PluginManager(Screen, DreamInfoHandler):
name = x[0].strip()
details = x[1].strip()
description = x[2].strip()
+ if description == "":
+ description = "No description available."
packagename = x[3].strip()
selectState = self.getSelectionState(details)
if iSoftwareTools.installed_packetlist.has_key(packagename):
@@ -921,17 +923,20 @@ class PluginManager(Screen, DreamInfoHandler):
self.close()
def runExecuteFinished(self):
- self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
- def ExecuteReboot(self, result):
- if result is None:
- return
- if result is False:
- self.reloadPluginlist()
+ self.reloadPluginlist()
+ restartRequired = plugins.restartRequired
+ if 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.detailsClosed(True)
+
+ def ExecuteReboot(self, result):
if result:
quitMainloop(3)
+ else:
+ self.selectedFiles = []
+ self.detailsClosed(True)
def reloadPluginlist(self):
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
@@ -1287,30 +1292,24 @@ class PluginDetails(Screen, DreamInfoHandler):
self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList)
def runUpgradeFinished(self):
- self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
- def UpgradeReboot(self, result):
- if result is None:
- return
- if result is False:
+ self.reloadPluginlist()
+ restartRequired = plugins.restartRequired
+ if restartRequired:
+ self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ else:
self.close(True)
+ def UpgradeReboot(self, result):
if result:
quitMainloop(3)
+ else:
+ self.close(True)
def runRemove(self, result):
if result:
self.session.openWithCallback(self.runRemoveFinished, Ipkg, cmdList = self.cmdList)
def runRemoveFinished(self):
- self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
-
- def RemoveReboot(self, result):
- if result is None:
- return
- if result is False:
- self.close(True)
- if result:
- quitMainloop(3)
+ self.close(True)
def reloadPluginlist(self):
plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
@@ -1884,7 +1883,7 @@ class PacketManager(Screen, NumericalTextInput):
if not self.Console:
self.Console = Console()
- cmd = "opkg list_installed"
+ cmd = "opkg list-installed"
self.Console.ePopen(cmd, self.IpkgListInstalled_Finished)
def IpkgListInstalled_Finished(self, result, retval, extra_args = None):
@@ -1916,6 +1915,8 @@ class PacketManager(Screen, NumericalTextInput):
def buildEntryComponent(self, name, version, description, state):
divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/div-h.png"))
+ if description == "":
+ description = "No description available."
if state == 'installed':
installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager/installed.png"))
return((name, version, _(description), state, installedpng, divpng))