From: acid-burn Date: Mon, 13 Dec 2010 11:41:13 +0000 (+0100) Subject: Merge remote branch 'origin/acid-burn/bug_629_show_autofs_volumes_as_backuplocation... X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=3b39f8eba7740ada48af5e3b6e7b1aaa59e3356e;hp=-c Merge remote branch 'origin/acid-burn/bug_629_show_autofs_volumes_as_backuplocation' into experimental --- 3b39f8eba7740ada48af5e3b6e7b1aaa59e3356e diff --combined lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index a6a611d,904fbb3..896d9f2 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@@ -261,9 -261,6 +261,6 @@@ class UpdatePluginMenu(Screen) for x in parts: if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/': parts.remove(x) - for x in parts: - if x[1].startswith('/autofs/'): - parts.remove(x) if len(parts): self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts) elif (currentEntry == "backupfiles"): @@@ -278,14 -275,20 +275,20 @@@ def backupfiles_choosen(self, ret): self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) - + config.plugins.configurationbackup.backupdirs.save() + config.plugins.configurationbackup.save() + config.save() + def backuplocation_choosen(self, option): + oldpath = config.plugins.configurationbackup.backuplocation.getValue() if option is not None: config.plugins.configurationbackup.backuplocation.value = str(option[1]) config.plugins.configurationbackup.backuplocation.save() config.plugins.configurationbackup.save() config.save() - self.createBackupfolders() + newpath = config.plugins.configurationbackup.backuplocation.getValue() + if newpath != oldpath: + self.createBackupfolders() def runUpgrade(self, result): if result: @@@ -1335,9 -1338,9 +1338,9 @@@ class UpdatePlugin(Screen) self["slider"] = self.slider self.activityslider = Slider(0, 100) self["activityslider"] = self.activityslider - self.status = StaticText(_("Upgrading Dreambox... Please wait")) + self.status = StaticText(_("Please wait...")) self["status"] = self.status - self.package = StaticText() + self.package = StaticText(_("Verifying your internet connection...")) self["package"] = self.package self.oktext = _("Press OK on your remote control to continue.") @@@ -1348,35 -1351,20 +1351,35 @@@ self.activity = 0 self.activityTimer = eTimer() self.activityTimer.callback.append(self.doActivityTimer) - self.activityTimer.start(100, False) self.ipkg = IpkgComponent() self.ipkg.addCallback(self.ipkgCallback) - self.updating = True - self.package.setText(_("Package list update")) - self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + self.updating = False self["actions"] = ActionMap(["WizardActions"], { "ok": self.exit, "back": self.exit }, -1) + + iNetwork.checkNetworkState(self.checkNetworkCB) + self.onClose.append(self.cleanup) + + def cleanup(self): + iNetwork.stopPingConsole() + + def checkNetworkCB(self,data): + if data is not None: + if data <= 2: + self.updating = True + self.activityTimer.start(100, False) + self.package.setText(_("Package list update")) + self.status.setText(_("Upgrading Dreambox... Please wait")) + self.ipkg.startCmd(IpkgComponent.CMD_UPDATE) + else: + self.package.setText(_("Your network is not working. Please try again.")) + self.status.setText(self.oktext) def doActivityTimer(self): self.activity += 1 @@@ -1455,9 -1443,6 +1458,9 @@@ self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?")) else: self.close() + else: + if not self.updating: + self.close() def exitAnswer(self, result): if result is not None and result: