[Sugar-devel] [sugar 0.98 PATCH] sl#3799: Truly show the "waiting" cursor, during the process a section-view is loaded.
Ajay Garg
ajay at activitycentral.com
Sun Aug 12 17:46:03 EDT 2012
When we click a section-view icon in "My Settings", we should "truly" be
shown the waiting cursor, during the duration the section-view is
loaded.
Currently, the code is there to show the waiting-cursor; however it does
not always take effect, since "realizing" the cursor would happen when
the main-thread goes idle.
Instead, it should be the other way around :: first let "realize" the
waiting-cursor; after this is done, proceed forward with further
actions, by scheduling the further-actions via "gobject.idle_add".
src/jarabe/controlpanel/gui.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 46810aa..f0639bc 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -207,6 +207,10 @@ class ControlPanel(gtk.Window):
self.__accept_clicked_cb)
def show_section_view(self, option):
+ self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+ gobject.idle_add(self._finally_show_section_view, option)
+
+ def _finally_show_section_view(self, option):
self._set_toolbar(self._section_toolbar)
icon = self._section_toolbar.get_icon()
@@ -228,7 +232,6 @@ class ControlPanel(gtk.Window):
model = ModelWrapper(mod)
try:
- self.get_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
self._section_view = view_class(model,
self._options[option]['alerts'])
--
1.7.4.4
More information about the Sugar-devel
mailing list