From d88fa514e937eb89782f90c29f770c79f9202a09 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 2 Feb 2006 17:00:37 +0000 Subject: [PATCH] * src/DisplayState.py: add standard function for using WATCH cursor * src/PageView.py: enable watch cursor when it is necessary to rebuild a page. svn: r5866 --- ChangeLog | 5 +++++ src/DisplayState.py | 8 ++++++++ src/PageView.py | 2 ++ 3 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index c0686a855..c8256dc6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-02 Don Allingham + * src/DisplayState.py: add standard function for using WATCH cursor + * src/PageView.py: enable watch cursor when it is necessary to + rebuild a page. + 2006-02-02 Alex Roitman * src/GrampsDb/_GrampsBSDDB.py (transaction_begin, transaction_commit): only do secondary index magic if not diff --git a/src/DisplayState.py b/src/DisplayState.py index 18bb05aae..d75eabc4d 100644 --- a/src/DisplayState.py +++ b/src/DisplayState.py @@ -584,6 +584,14 @@ class DisplayState(GrampsDb.GrampsDBCallback): self.log.setLevel(logging.WARN) self.log.addHandler(self.rh) + def set_busy_cursor(self,value): + if value: + self.window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) + else: + self.window.window.set_cursor(None) + while gtk.events_pending(): + gtk.main_iteration() + def set_open_widget(self,widget): self.widget = widget diff --git a/src/PageView.py b/src/PageView.py index e7627fb12..d5226bb49 100644 --- a/src/PageView.py +++ b/src/PageView.py @@ -54,7 +54,9 @@ class PageView: def set_active(self): self.active = True if self.dirty: + self.uistate.set_busy_cursor(True) self.build_tree() + self.uistate.set_busy_cursor(False) def set_inactive(self): self.active = False