self.path = BackupPath[str(currentConfigSelectionElement(config.backup.location))]
if currentConfigSelectionElement(config.backup.type) == "full":
print "Backup Mode: Full"
- self.session.open(Console, ["Backup running", "tar -czvf " + self.path + "/" + str(dt) + "_full_backup.tar.gz /etc/"])
+ self.session.open(Console, title = "Backup running", cmdlist = ["tar -czvf " + self.path + "/" + str(dt) + "_full_backup.tar.gz /etc/"])
if currentConfigSelectionElement(config.backup.type) == "settings":
print "Backup Mode: Settings"
- self.session.open(Console, ["Backup running", "tar -czvf " + self.path + "/" + str(dt) + "_settings_backup.tar.gz /etc/enigma2/"])
+ self.session.open(Console, title = "Backup running", cmdlist = ["tar -czvf " + self.path + "/" + str(dt) + "_settings_backup.tar.gz /etc/enigma2/"])
if currentConfigSelectionElement(config.backup.type) == "var":
print "Backup Mode: var"
- self.session.open(Console, ["Backup running", "tar -czvf " + self.path + "/" + str(dt) + "_var_backup.tar.gz /var/"])
+ self.session.open(Console, title = "Backup running", cmdlist = [ "tar -czvf " + self.path + "/" + str(dt) + "_var_backup.tar.gz /var/"])
if currentConfigSelectionElement(config.backup.type) == "skin":
print "Backup Mode: skin"
- self.session.open(Console, ["Backup running", "tar -czvf " + self.path + "/" + str(dt) + "_skin_backup.tar.gz /usr/share/enigma2/"])
+ self.session.open(Console, title ="Backup running", cmdlist = [ "tar -czvf " + self.path + "/" + str(dt) + "_skin_backup.tar.gz /usr/share/enigma2/"])
else:
self.session.open(MessageBox, _("Sorry your Backup destination does not exist\n\nPlease choose an other one."), MessageBox.TYPE_INFO)
def startRestore(self, ret = False):
if (ret == True):
self.exe = True
- self.session.open(Console, ["Restore running", "tar -xzvf " + self.path + "/" + self.sel + " -C /", "killall enigma2"])
+ self.session.open(Console, title = "Restore running", cmdlist = ["tar -xzvf " + self.path + "/" + self.sel + " -C /", "killall enigma2"])
def Exit(self):
self.close()
self.session.open(MessageBox, _("Function not yet implemented"), MessageBox.TYPE_ERROR)
def runUpgrade(self, result):
if result:
- self.session.open(Console, ["ipkg update", "ipkg upgrade -force-defaults -force-overwrite"])
+ self.session.open(Console, title = "Upgrade running...", cmdlist = ["ipkg update", "ipkg upgrade -force-defaults -force-overwrite"])
class IPKGSource(Screen):
skin = """
<widget name="text" position="0,0" size="550,400" font="Regular;15" />
</screen>"""
- def __init__(self, session, args = None):
+ def __init__(self, session, title = "Console", cmdlist = None):
self.skin = Console.skin
Screen.__init__(self, session)
"down": self["text"].pageDown
}, -1)
- self.cmdlist = args
+ self.cmdlist = cmdlist
+ self.newtitle = title
+
+ self.onShown.append(self.updateTitle)
self.container = eConsoleAppContainer()
self.run = 0
self.container.dataAvail.get().append(self.dataAvail)
self.onLayoutFinish.append(self.startRun) # dont start before gui is finished
+ def updateTitle(self):
+ self.setTitle(self.newtitle)
+
def startRun(self):
self["text"].setText(_("Execution Progress:") + "\n\n")
print "Console: executing in run", self.run, " the command:", self.cmdlist[self.run]