[Dextrose] [olpc-updater PATCH] sl#2818: Changes in olpc-updater package.

Ajay Garg ajay at activitycentral.com
Fri Mar 2 14:56:09 EST 2012


When Software-Update section-view is launched, directory monitoring is disabled,
so that any change in journal-model does not trigger any sense of new package being installed.

 extensions/cpsection/updater/view.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/extensions/cpsection/updater/view.py b/extensions/cpsection/updater/view.py
index 11c9f78..e246a6a 100755
--- a/extensions/cpsection/updater/view.py
+++ b/extensions/cpsection/updater/view.py
@@ -25,6 +25,7 @@ from sugar.graphics import style
 
 from jarabe.controlpanel.sectionview import SectionView
 from jarabe.controlpanel.inlinealert import InlineAlert
+from jarabe.model import bundleregistry
 
 import model
 from model import _humanize_size, _svg2pixbuf, inhibit_suspend
@@ -498,6 +499,9 @@ class ActivityUpdater(SectionView):
 
     def __init__(self, modelwrapper, alerts):
         SectionView.__init__(self)
+
+        bundleregistry.get_registry().disable_directory_monitoring()
+
         self._in_sugar = (modelwrapper is not None)
         self.set_spacing(style.DEFAULT_SPACING)
         self.set_border_width(style.DEFAULT_SPACING * 2)
@@ -657,6 +661,12 @@ class ActivityUpdater(SectionView):
     def destroy(self, widget, data=None):
         gtk.main_quit()
 
+    def perform_cancel_actions(self):
+        bundleregistry.get_registry().enable_directory_monitoring()
+
+    def perform_accept_actions(self):
+        bundleregistry.get_registry().enable_directory_monitoring()
+
     def main(self):
         """Start gtk main loop."""
         gtk.main()
-- 
1.7.4.4



More information about the Dextrose mailing list