From eaaa5fcccfb320f8f6faa240867b56d1678d8391 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 21 Jan 2006 20:55:06 +0000 Subject: [PATCH] * src/ViewManager.py (pulse_progressbar): Print percentage text; Set cursor to WATCH on open and import. svn: r5815 --- ChangeLog | 4 ++++ src/ViewManager.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index a4c0a69d4..705b048f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-21 Alex Roitman + * src/ViewManager.py (pulse_progressbar): Print percentage text; + Set cursor to WATCH on open and import. + 2006-01-20 Don Allingham * src/PageView.py: remove debug statements * src/ViewManager.py: check for existing action group before removing diff --git a/src/ViewManager.py b/src/ViewManager.py index e22c401ae..302e6f14e 100644 --- a/src/ViewManager.py +++ b/src/ViewManager.py @@ -745,6 +745,7 @@ class ViewManager: return True def load_database(self,name,callback=None,mode="w"): + self.window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.progress.show() if not self.state.db.load(name,self.pulse_progressbar,mode): return False @@ -783,6 +784,7 @@ class ViewManager: self.state.db.undo_callback = self.change_undo_label self.state.db.redo_callback = self.change_redo_label self.actiongroup.set_visible(True) + self.window.window.set_cursor(None) return True def change_undo_label(self,label): @@ -852,6 +854,7 @@ class ViewManager: def pulse_progressbar(self,value): self.progress.set_fraction(value/100.0) + self.progress.set_text("%d%%" % value) while gtk.events_pending(): gtk.main_iteration() @@ -924,16 +927,20 @@ class ViewManager: if filetype == const.app_gramps: choose.destroy() + self.window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.progress.show() GrampsDb.gramps_db_reader_factory(filetype)(self.state.db,filename,self.pulse_progressbar) self.parent.import_tool_callback() self.progress.hide() + self.window.window.set_cursor(None) return True elif filetype == const.app_gramps_xml or filetype == const.app_gedcom: choose.destroy() + self.window.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) self.progress.show() GrampsDb.gramps_db_reader_factory(filetype)(self.state.db,filename,self.pulse_progressbar) self.progress.hide() + self.window.window.set_cursor(None) return True (the_path,the_file) = os.path.split(filename)