X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5346cb6fc890e76e3b61c616aa6fb7c9ecbe5ae8..bb349d44c5c3e963d25f31c085e92407d2c2b0a9:/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py diff --git a/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py index c71ffdbb..8127514c 100644 --- a/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareUpdate/plugin.py @@ -4,7 +4,6 @@ from Components.Input import Input from Components.Ipkg import IpkgComponent from Components.Label import Label from Components.MenuList import MenuList -from Components.ScrollLabel import ScrollLabel from Components.Slider import Slider from Plugins.Plugin import PluginDescriptor from Screens.Console import Console @@ -91,12 +90,16 @@ class IPKGSource(Screen): self["text"] = Input(sources[0], maxSize=False, type=Input.TEXT) - self["actions"] = NumberActionMap(["WizardActions", "InputActions"], + self["actions"] = NumberActionMap(["WizardActions", "InputActions", "TextEntryActions", "KeyboardInputActions"], { "ok": self.go, "back": self.close, "left": self.keyLeft, "right": self.keyRight, + "home": self.keyHome, + "end": self.keyEnd, + "deleteForward": self.deleteForward, + "deleteBackward": self.deleteBackward, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, @@ -121,6 +124,18 @@ class IPKGSource(Screen): def keyRight(self): self["text"].right() + def keyHome(self): + self["text"].home() + + def keyEnd(self): + self["text"].end() + + def keyDeleteForward(self): + self["text"].delete() + + def keyDeleteBackward(self): + self["text"].deleteBackward() + def keyNumberGlobal(self, number): print "pressed", number self["text"].number(number) @@ -253,7 +268,7 @@ class UpdatePlugin(Screen): self.activity = 0 self.activityTimer = eTimer() - self.activityTimer.timeout.get().append(self.doActivityTimer) + self.activityTimer.callback.append(self.doActivityTimer) self.activityTimer.start(100, False) self.ipkg = IpkgComponent() @@ -291,6 +306,12 @@ class UpdatePlugin(Screen): elif event == IpkgComponent.EVENT_CONFIGURING: self.package.setText(param) self.status.setText(_("Configuring")) + elif event == IpkgComponent.EVENT_MODIFIED: + self.session.openWithCallback( + self.modificationCallback, + MessageBox, + _("A configuration file (%s) was modified since Installation.\nDo you want to keep your version?") % (param) + ) elif event == IpkgComponent.EVENT_ERROR: self.error += 1 elif event == IpkgComponent.EVENT_DONE: @@ -316,7 +337,10 @@ class UpdatePlugin(Screen): self.status.setText(_("Error") + " - " + error) #print event, "-", param pass - + + def modificationCallback(self, res): + self.ipkg.write(res and "N" or "Y") + def exit(self): if not self.ipkg.isRunning(): if self.packages != 0 and self.error == 0: