config.plugins.configurationbackup = ConfigSubsection()
config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
-config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
+config.plugins.configurationbackup.backupdirs = ConfigLocations(default=[eEnv.resolve('${sysconfdir}/enigma2/'), '/etc/network/interfaces', '/etc/wpa_supplicant.conf', '/etc/wpa_supplicant.ath0.conf', '/etc/wpa_supplicant.wlan0.conf', '/etc/resolv.conf', '/etc/default_gw', '/etc/hostname'])
-config.plugins.SoftwareManager = ConfigSubsection()
-config.plugins.SoftwareManager.overwriteConfigFiles = ConfigSelection(
+config.plugins.softwaremanager = ConfigSubsection()
+config.plugins.softwaremanager.overwriteConfigFiles = ConfigSelection(
[
("Y", _("Yes, always")),
("N", _("No, never")),
self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
if self.menu == 0:
print "building menu entries"
- self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your Dreambox" ) + self.oktext, None))
- self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None))
- self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None))
- self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext + "\n\n" + self.infotext, None))
- self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None))
+ self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your STB" ) + self.oktext, None))
+ self.list.append(("software-update", _("Software update"), _("\nOnline update of your STB software." ) + self.oktext, None))
+ self.list.append(("software-restore", _("Software restore"), _("\nRestore your STB with a new firmware." ) + self.oktext, None))
+ self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your STB settings." ) + self.oktext + "\n\n" + self.infotext, None))
+ self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your STB settings." ) + self.oktext, None))
self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local extensions and install them." ) + self.oktext, None))
for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER):
if p.__call__.has_key("SoftwareSupported"):
currentEntry = current[0]
if self.menu == 0:
if (currentEntry == "software-update"):
- self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!"))
+ self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your STB?")+"\n"+_("\nAfter pressing OK, please wait!"))
elif (currentEntry == "software-restore"):
self.session.open(ImageWizard)
elif (currentEntry == "install-extensions"):
def createSetup(self):
self.list = [ ]
- self.overwriteConfigfilesEntry = getConfigListEntry(_("Overwrite configuration files ?"), config.plugins.SoftwareManager.overwriteConfigFiles)
+ self.overwriteConfigfilesEntry = getConfigListEntry(_("Overwrite configuration files ?"), config.plugins.softwaremanager.overwriteConfigFiles)
self.list.append(self.overwriteConfigfilesEntry)
self["config"].list = self.list
self["config"].l.setSeperation(400)
self.list = []
backupfiles = config.plugins.configurationbackup.backupdirs.value
for entry in backupfiles:
- print entry
self.list.append((entry,))
self['list'].setList(self.list)
self.currentSelectedIndex = None
self.currentSelectedPackage = None
self.saved_currentSelectedPackage = None
+ self.restartRequired = False
self.onShown.append(self.setWindowTitle)
self.onLayoutFinish.append(self.getUpdateInfos)
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':
def runExecuteFinished(self):
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)
+ if plugins.restartRequired or self.restartRequired:
+ self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
else:
self.selectedFiles = []
+ self.restartRequired = False
self.detailsClosed(True)
def ExecuteReboot(self, result):
quitMainloop(3)
else:
self.selectedFiles = []
+ self.restartRequired = False
self.detailsClosed(True)
def reloadPluginlist(self):
elif cmd == 2:
info = args['package']
else:
- info = _("Dreambox software because updates are available.")
+ info = _("STB software because updates are available.")
self.list.append(self.buildEntryComponent(action,info))
self['list'].setList(self.list)
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()
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:
for package in self.packagefiles[:]:
self.cmdList.append((IpkgComponent.CMD_REMOVE, { "package": package["name"] }))
- if len(self.cmdList):
- self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n") + self.pluginname + "\n" + self.oktext)
+ if len(self.cmdList):
+ self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n") + self.pluginname + "\n" + self.oktext)
else:
if iSoftwareTools.NetworkConnectionAvailable:
if self.packagefiles:
for package in self.packagefiles[:]:
self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": package["name"] }))
- if len(self.cmdList):
- self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n") + self.pluginname + "\n" + self.oktext)
+ if len(self.cmdList):
+ self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n") + self.pluginname + "\n" + self.oktext)
def runUpgrade(self, result):
if result:
def runUpgradeFinished(self):
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)
+ if plugins.restartRequired or self.restartRequired:
+ self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
else:
self.close(True)
def UpgradeReboot(self, result):
self.updating = True
self.activityTimer.start(100, False)
self.package.setText(_("Package list update"))
- self.status.setText(_("Upgrading Dreambox... Please wait"))
+ self.status.setText(_("Upgrading STB... Please wait"))
self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
else:
self.package.setText(_("Your network is not working. Please try again."))
self.status.setText(_("Configuring"))
elif event == IpkgComponent.EVENT_MODIFIED:
- if config.plugins.SoftwareManager.overwriteConfigFiles.value in ("N", "Y"):
- self.ipkg.write(True and config.plugins.SoftwareManager.overwriteConfigFiles.value)
+ if config.plugins.softwaremanager.overwriteConfigFiles.value in ("N", "Y"):
+ self.ipkg.write(True and config.plugins.softwaremanager.overwriteConfigFiles.value)
else:
self.session.openWithCallback(
self.modificationCallback,
else:
self.activityTimer.stop()
self.activityslider.setValue(0)
- error = _("your dreambox might be unusable now. Please consult the manual for further assistance before rebooting your dreambox.")
+ error = _("your STB might be unusable now. Please consult the manual for further assistance before rebooting your STB.")
if self.packages == 0:
error = _("No packages were upgraded yet. So you can check your network and try again.")
if self.updating:
- error = _("Your dreambox isn't connected to the internet properly. Please check it and try again.")
+ error = _("Your STB isn't connected to the internet properly. Please check it and try again.")
self.status.setText(_("Error") + " - " + error)
#print event, "-", param
pass
def exit(self):
if not self.ipkg.isRunning():
if self.packages != 0 and self.error == 0:
- self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"))
+ self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"))
else:
self.close()
else:
else:
self["text"] = Input(text, maxSize=False, visible_width = 55, type=Input.TEXT)
- self["actions"] = NumberActionMap(["WizardActions", "InputActions", "TextEntryActions", "KeyboardInputActions","ShortcutActions"],
+ self["actions"] = NumberActionMap(["WizardActions", "InputActions", "TextEntryActions", "KeyboardInputActions","ShortcutActions", "InputAsciiActions"],
{
+ "gotAsciiCode": self.gotAsciiCode,
"ok": self.go,
"back": self.close,
"red": self.close,
self.onLayoutFinish.append(self.layoutFinished)
+ def gotAsciiCode(self):
+ self["text"].handleAscii(getPrevAsciiCode())
+
def layoutFinished(self):
self.setWindowTitle()
self["text"].right()
self.setNextIdx(keyvalue[0])
def keyGotAscii(self):
- keyvalue = unichr(getPrevAsciiCode()).encode("utf-8")
+ from Components.config import getCharValue
+ unichar = getCharValue(getPrevAsciiCode())
+ if unichar is None:
+ return
+ if len(str(unichar)) > 1:
+ return
+ keyvalue = unichar.encode("utf-8")
if len(keyvalue) == 1:
self.setNextIdx(keyvalue[0])
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)
+ self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
def RemoveReboot(self, result):
if result is None:
self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList)
def runUpgradeFinished(self):
- self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
def UpgradeReboot(self, result):
if result is None: