add support for cyclic garbage collection to eTimer and eSocketNotifier
[vuplus_dvbapp] / lib / python / Screens / Ipkg.py
index af80e00..eac0347 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
@@ -25,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()
@@ -94,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()