update data properly

svn: r6183
This commit is contained in:
Don Allingham 2006-03-21 02:39:01 +00:00
parent f3b8387c06
commit 3ffa47bfb1
3 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,6 @@
2006-03-20 Don Allingham <don@gramps-project.org> 2006-03-20 Don Allingham <don@gramps-project.org>
* src/Editors/_EditPerson.py: call the callback if defined
* src/SelectPerson.py: take out the profiling code
* src/GrampsDb/_GrampsBSDDB.py: use db.THREAD to avoid * src/GrampsDb/_GrampsBSDDB.py: use db.THREAD to avoid
RUNRECOVERY error, fix cursors RUNRECOVERY error, fix cursors

View File

@ -480,6 +480,8 @@ class EditPerson(EditPrimary):
self.db.transaction_commit(trans,_("Edit Person (%s)") % self.nd.display(self.obj)) self.db.transaction_commit(trans,_("Edit Person (%s)") % self.nd.display(self.obj))
self.close() self.close()
if self.callback:
self.callback(self.obj)
def edit_name_clicked(self,obj): def edit_name_clicked(self,obj):
NameEdit.NameEditor(self.dbstate, self.uistate, self.track, NameEdit.NameEditor(self.dbstate, self.uistate, self.track,

View File

@ -66,15 +66,15 @@ class SelectPerson:
self.glade.get_widget('title'), self.glade.get_widget('title'),
title) title)
import hotshot, hotshot.stats # import hotshot, hotshot.stats
pr = hotshot.Profile('profile.data') # pr = hotshot.Profile('profile.data')
pr.runcall(self.foo) # pr.runcall(self.foo)
pr.close() # pr.close()
stats = hotshot.stats.load('profile.data') # stats = hotshot.stats.load('profile.data')
stats.strip_dirs() # stats.strip_dirs()
stats.sort_stats('time','calls') # stats.sort_stats('time','calls')
stats.print_stats(35) # stats.print_stats(35)
self.model = PeopleModel.PeopleModel(self.db, self.model = PeopleModel.PeopleModel(self.db,
data_filter=filter, data_filter=filter,
@ -118,8 +118,8 @@ class SelectPerson:
def run(self): def run(self):
val = self.top.run() val = self.top.run()
if val == gtk.RESPONSE_OK: if val == gtk.RESPONSE_OK:
self.top.destroy()
idlist = self.get_selected_ids() idlist = self.get_selected_ids()
self.top.destroy()
if idlist and idlist[0]: if idlist and idlist[0]:
return_value = self.db.get_person_from_handle(idlist[0]) return_value = self.db.get_person_from_handle(idlist[0])
else: else: