2007-01-20 Alex Roitman <shura@gramps-project.org>

* src/Utils.py (profile): Accept and pass additional arguments.
	* src/DataViews/_PersonView.py (delete_person_response): Busy cursor.



svn: r7937
This commit is contained in:
Alex Roitman 2007-01-20 09:35:40 +00:00
parent c2b4c7cdbb
commit d6f654a0e0
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2007-01-20 Alex Roitman <shura@gramps-project.org>
* src/Utils.py (profile): Accept and pass additional arguments.
* src/DataViews/_PersonView.py (delete_person_response): Busy cursor.
2007-01-19 Don Allingham <don@gramps-project.org> 2007-01-19 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: add append_list task * src/GrampsDb/_GrampsDbBase.py: add append_list task
* src/GrampsDb/_ReadGrdb.py: copy bookmarks properly on import * src/GrampsDb/_ReadGrdb.py: copy bookmarks properly on import

View File

@ -615,6 +615,7 @@ class PersonView(PageView.PersonNavView):
def delete_person_response(self): def delete_person_response(self):
#self.disable_interface() #self.disable_interface()
self.uistate.set_busy_cursor(1)
trans = self.dbstate.db.transaction_begin() trans = self.dbstate.db.transaction_begin()
active_name = NameDisplay.displayer.display(self.active_person) active_name = NameDisplay.displayer.display(self.active_person)
@ -670,6 +671,7 @@ class PersonView(PageView.PersonNavView):
self.uistate.phistory.back() self.uistate.phistory.back()
self.dbstate.db.transaction_commit( self.dbstate.db.transaction_commit(
trans, _("Delete Person (%s)") % active_name) trans, _("Delete Person (%s)") % active_name)
self.uistate.set_busy_cursor(0)
def build_columns(self): def build_columns(self):
for column in self.columns: for column in self.columns:

View File

@ -1076,12 +1076,12 @@ def launch(prog_str,path):
os.spawnvpe(os.P_NOWAIT, prog, prog_list, os.environ) os.spawnvpe(os.P_NOWAIT, prog, prog_list, os.environ)
def profile(func): def profile(func,*args):
import hotshot, hotshot.stats import hotshot, hotshot.stats
pr = hotshot.Profile('mystats.profile') pr = hotshot.Profile('mystats.profile')
print "Start" print "Start"
pr.runcall(func) pr.runcall(func,*args)
print "Finished" print "Finished"
pr.close() pr.close()
print "Loading profile" print "Loading profile"