aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins
diff options
context:
space:
mode:
authoracid-burn <acidburn@opendreambox.org>2009-10-02 17:13:27 +0200
committeracid-burn <acidburn@opendreambox.org>2009-10-02 17:13:27 +0200
commit8b9b6e0b8e78557a6d7fba7fcb5b0d4052f3838a (patch)
treeb638e0086f0b11674e7da517331ca5cf7b6e4215 /lib/python/Plugins
parent926deb4950b81f14a90443de0910025941953a7a (diff)
downloadenigma2-8b9b6e0b8e78557a6d7fba7fcb5b0d4052f3838a.tar.gz
enigma2-8b9b6e0b8e78557a6d7fba7fcb5b0d4052f3838a.zip
SystemPlugins/SoftwareManager: - add timeout to MessageBox
- reset /proc/stb/vmpeg/0/dst* to defaults after a restore so enigma doesnt restart in pip mode if pip was enabled
Diffstat (limited to 'lib/python/Plugins')
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py8
-rwxr-xr-xlib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py12
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
index 5ae46b60..871f0a30 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
@@ -309,10 +309,14 @@ class RestoreScreen(Screen, ConfigListScreen):
self.setTitle(_("Restore is running..."))
def doRestore(self):
+ if path.exists("/proc/stb/vmpeg/0/dst_width"):
+ restorecmdlist = ["tar -xzvf " + self.fullbackupfilename + " -C /", "echo 0 > /proc/stb/vmpeg/0/dst_height", "echo 0 > /proc/stb/vmpeg/0/dst_left", "echo 0 > /proc/stb/vmpeg/0/dst_top", "echo 0 > /proc/stb/vmpeg/0/dst_width", "killall -9 enigma2"]
+ else:
+ restorecmdlist = ["tar -xzvf " + self.fullbackupfilename + " -C /", "killall -9 enigma2"]
if self.finished_cb:
- self.session.openWithCallback(self.finished_cb, Console, title = _("Restore is running..."), cmdlist = ["tar -xzvf " + self.fullbackupfilename + " -C /", "killall -9 enigma2"])
+ self.session.openWithCallback(self.finished_cb, Console, title = _("Restore is running..."), cmdlist = restorecmdlist)
else:
- self.session.open(Console, title = _("Restore is running..."), cmdlist = ["tar -xzvf " + self.fullbackupfilename + " -C /", "killall -9 enigma2"])
+ self.session.open(Console, title = _("Restore is running..."), cmdlist = restorecmdlist)
def backupFinishedCB(self,retval = None):
self.close(True)
diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
index 6254c6c2..c10a7e5f 100755
--- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
+++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
@@ -164,13 +164,13 @@ class UpdatePluginMenu(Screen):
if os_path.exists(self.fullbackupfilename):
self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore your Enigma2 backup?\nEnigma2 will restart after the restore"))
else:
- self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO, timeout = 10)
elif (current == "ipkg-install"):
try:
from Plugins.Extensions.MediaScanner.plugin import main
main(self.session)
except:
- self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO, timeout = 10)
elif (current == "advanced"):
self.session.open(UpdatePluginMenu, 1)
elif self.menu == 1:
@@ -215,13 +215,13 @@ class UpdatePluginMenu(Screen):
if (os_path.exists(self.backuppath) == False):
makedirs(self.backuppath)
except OSError:
- self.session.open(MessageBox, _("Sorry, your backup destination is not writeable.\n\nPlease choose another one."), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Sorry, your backup destination is not writeable.\n\nPlease choose another one."), MessageBox.TYPE_INFO, timeout = 10)
def backupDone(self,retval = None):
if retval is True:
- self.session.open(MessageBox, _("Backup done."), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Backup done."), MessageBox.TYPE_INFO, timeout = 10)
else:
- self.session.open(MessageBox, _("Backup failed."), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Backup failed."), MessageBox.TYPE_INFO, timeout = 10)
def startRestore(self, ret = False):
if (ret == True):
@@ -961,7 +961,7 @@ class PluginManager(Screen, DreamInfoHandler):
if (os_path.exists(detailsfile) == True):
self.session.openWithCallback(self.detailsClosed, PluginDetails, self.skin_path, current)
else:
- self.session.open(MessageBox, _("Sorry, no Details available!"), MessageBox.TYPE_INFO)
+ self.session.open(MessageBox, _("Sorry, no Details available!"), MessageBox.TYPE_INFO, timeout = 10)
elif self.currList == "category":
self.prepareInstall()
if len(self.cmdList):