Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
[enigma2.git] / lib / python / Screens / Ipkg.py
index 07a7eca4e3f631a110c3f284a0bf391900ec4ac4..eac034798ef2e895fb2925c90e9324fa3e81cf89 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):
@@ -27,7 +28,7 @@ class Ipkg(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()
@@ -96,7 +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):
                if not self.ipkg.isRunning():
                        self.close()