[Sugar-devel] [PATCH] Added busy cursor when we open any section in control panel. (Ticket #245)

Ishan Bansal ishan at seeta.in
Wed Sep 22 09:35:48 EDT 2010


The sections in control panel should activate busy cursor so that user
could be given a impression that their request is in progress.
---
 src/jarabe/controlpanel/gui.py |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 51d9820..d793b92 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -214,11 +214,16 @@ class ControlPanel(gtk.Window):
                          globals(), locals(), ['model'])
         model = ModelWrapper(mod)
 
-        self._section_view = view_class(model,
-                                        self._options[option]['alerts'])
-
-        self._set_canvas(self._section_view)
-        self._section_view.show()
+        try:
+            self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) 
+            self._section_view = view_class(model,
+                                            self._options[option]['alerts'])
+
+            self._set_canvas(self._section_view)
+            self._section_view.show()
+        finally:
+            self.get_window().set_cursor(None)   
+  
         self._section_view.connect('notify::is-valid',
                                    self.__valid_section_cb)
         self._section_view.connect('request-close',
-- 
1.7.0.4



More information about the Sugar-devel mailing list