diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index a015d8064..cccddeb71 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,11 +1,15 @@ 2007-01-20 Alex Roitman + * src/DataViews/_EventView.py (remove): Use reference map to find + references to remove. + * src/ViewManager.py (undo,redo): Busy cursor. * src/GrampsDb/_GrampsDbBase.py (transaction_commit): Remove backend-specific call. * src/GrampsDb/_GrampsBSDDB.py (transaction_commit): Move surname list build to work for any batch transaction. * src/GrampsDb/_GrampsInMemDB.py (transaction_commit): Add method. * src/Utils.py (profile): Accept and pass additional arguments. - * src/DataViews/_PersonView.py (delete_person_response): Busy cursor. + * src/DataViews/_PersonView.py (delete_person_response): Busy cursor; + Use reference map to find references to remove. 2007-01-19 Don Allingham * src/GrampsDb/_GrampsDbBase.py: add append_list task diff --git a/gramps2/src/DataViews/_EventView.py b/gramps2/src/DataViews/_EventView.py index f5c95fcbe..d0ec87872 100644 --- a/gramps2/src/DataViews/_EventView.py +++ b/gramps2/src/DataViews/_EventView.py @@ -192,16 +192,13 @@ class EventView(PageView.ListView): def remove(self, obj): for ehandle in self.selected_handles(): db = self.dbstate.db - person_list = [ - h for h in - db.get_person_handles(False) - if db.get_person_from_handle(h).has_handle_reference('Event', - ehandle) ] + person_list = [ + item[1] for item in + self.dbstate.db.find_backlink_handles(ehandle,['Person']) ] + family_list = [ - h for h in - db.get_family_handles() - if db.get_family_from_handle(h).has_handle_reference('Event', - ehandle) ] + item[1] for item in + self.dbstate.db.find_backlink_handles(ehandle,['Family']) ] event = db.get_event_from_handle(ehandle) diff --git a/gramps2/src/DataViews/_PersonView.py b/gramps2/src/DataViews/_PersonView.py index 0ef48c8fe..b9da68f5a 100644 --- a/gramps2/src/DataViews/_PersonView.py +++ b/gramps2/src/DataViews/_PersonView.py @@ -655,10 +655,10 @@ class PersonView(PageView.PersonNavView): handle = self.active_person.get_handle() - person_list = [ - phdl for phdl in self.dbstate.db.get_person_handles(False) - if self.dbstate.db.get_person_from_handle(phdl).has_handle_reference('Person', - handle) ] + person_list = [ + item[1] for item in + self.dbstate.db.find_backlink_handles(handle,['Person'])] + for phandle in person_list: person = self.dbstate.db.get_person_from_handle(phandle) person.remove_handle_references('Person', handle) diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 73d5c1239..13562bbc5 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -1045,10 +1045,14 @@ class ViewManager: pass def undo(self, obj): + self.uistate.set_busy_cursor(1) self.state.db.undo() + self.uistate.set_busy_cursor(0) def redo(self, obj): + self.uistate.set_busy_cursor(1) self.state.db.redo() + self.uistate.set_busy_cursor(0) def undo_history(self, obj): try: