diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 9d91b0792..fc0b21d0e 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2006-03-20 Don Allingham + * 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 RUNRECOVERY error, fix cursors diff --git a/gramps2/src/Editors/_EditPerson.py b/gramps2/src/Editors/_EditPerson.py index bb2c16ac3..d5ea92cfc 100644 --- a/gramps2/src/Editors/_EditPerson.py +++ b/gramps2/src/Editors/_EditPerson.py @@ -480,6 +480,8 @@ class EditPerson(EditPrimary): self.db.transaction_commit(trans,_("Edit Person (%s)") % self.nd.display(self.obj)) self.close() + if self.callback: + self.callback(self.obj) def edit_name_clicked(self,obj): NameEdit.NameEditor(self.dbstate, self.uistate, self.track, diff --git a/gramps2/src/SelectPerson.py b/gramps2/src/SelectPerson.py index 5ae4ef213..6389fd739 100644 --- a/gramps2/src/SelectPerson.py +++ b/gramps2/src/SelectPerson.py @@ -66,15 +66,15 @@ class SelectPerson: self.glade.get_widget('title'), title) - import hotshot, hotshot.stats +# import hotshot, hotshot.stats - pr = hotshot.Profile('profile.data') - pr.runcall(self.foo) - pr.close() - stats = hotshot.stats.load('profile.data') - stats.strip_dirs() - stats.sort_stats('time','calls') - stats.print_stats(35) +# pr = hotshot.Profile('profile.data') +# pr.runcall(self.foo) +# pr.close() +# stats = hotshot.stats.load('profile.data') +# stats.strip_dirs() +# stats.sort_stats('time','calls') +# stats.print_stats(35) self.model = PeopleModel.PeopleModel(self.db, data_filter=filter, @@ -118,8 +118,8 @@ class SelectPerson: def run(self): val = self.top.run() if val == gtk.RESPONSE_OK: - self.top.destroy() idlist = self.get_selected_ids() + self.top.destroy() if idlist and idlist[0]: return_value = self.db.get_person_from_handle(idlist[0]) else: