From e724beb172aae330bbd27b31b9100949a990ec23 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 20 Jan 2007 09:35:40 +0000 Subject: [PATCH] 2007-01-20 Alex Roitman * src/Utils.py (profile): Accept and pass additional arguments. * src/DataViews/_PersonView.py (delete_person_response): Busy cursor. svn: r7937 --- gramps2/ChangeLog | 4 ++++ gramps2/src/DataViews/_PersonView.py | 2 ++ gramps2/src/Utils.py | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5cf1e066f..096283051 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2007-01-20 Alex Roitman + * src/Utils.py (profile): Accept and pass additional arguments. + * src/DataViews/_PersonView.py (delete_person_response): Busy cursor. + 2007-01-19 Don Allingham * src/GrampsDb/_GrampsDbBase.py: add append_list task * src/GrampsDb/_ReadGrdb.py: copy bookmarks properly on import diff --git a/gramps2/src/DataViews/_PersonView.py b/gramps2/src/DataViews/_PersonView.py index 7f240e4c2..0ef48c8fe 100644 --- a/gramps2/src/DataViews/_PersonView.py +++ b/gramps2/src/DataViews/_PersonView.py @@ -615,6 +615,7 @@ class PersonView(PageView.PersonNavView): def delete_person_response(self): #self.disable_interface() + self.uistate.set_busy_cursor(1) trans = self.dbstate.db.transaction_begin() active_name = NameDisplay.displayer.display(self.active_person) @@ -670,6 +671,7 @@ class PersonView(PageView.PersonNavView): self.uistate.phistory.back() self.dbstate.db.transaction_commit( trans, _("Delete Person (%s)") % active_name) + self.uistate.set_busy_cursor(0) def build_columns(self): for column in self.columns: diff --git a/gramps2/src/Utils.py b/gramps2/src/Utils.py index 04c3a6d2a..0f8a9cdc1 100644 --- a/gramps2/src/Utils.py +++ b/gramps2/src/Utils.py @@ -1076,12 +1076,12 @@ def launch(prog_str,path): os.spawnvpe(os.P_NOWAIT, prog, prog_list, os.environ) -def profile(func): +def profile(func,*args): import hotshot, hotshot.stats pr = hotshot.Profile('mystats.profile') print "Start" - pr.runcall(func) + pr.runcall(func,*args) print "Finished" pr.close() print "Loading profile"