use setup_<setupkey> as alternative skin name for Setup, for customization of specifi...
[enigma2.git] / lib / python / Screens / Ipkg.py
index 95bf4f15d2f50712392946d2699513dd93d2eb52..216cf8c85b96244de6691327bc34dfb080c9c4dc 100644 (file)
@@ -3,6 +3,7 @@ from Components.Ipkg import IpkgComponent
 from Components.Label import Label
 from Components.Slider import Slider
 from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
 from enigma import eTimer
 
 class Ipkg(Screen):
@@ -10,6 +11,8 @@ class Ipkg(Screen):
                Screen.__init__(self, session)
                
                self.cmdList = cmdList
+
+               self.sliderPackages = {}
                
                self.slider = Slider(0, len(cmdList))
                self["slider"] = self.slider
@@ -94,6 +97,16 @@ class Ipkg(Screen):
                        self.error += 1
                elif event == IpkgComponent.EVENT_DONE:
                        self.runNextCmd()
-       
+               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)
+                        )
+
+       def modificationCallback(self, res):
+               self.ipkg.write(res and "N" or "Y")
+
        def exit(self):
-               self.close()
+               if not self.ipkg.isRunning():
+                       self.close()