* src/DataViews/_EventView.py (remove): Use reference map to find

references to remove. 
	* src/ViewManager.py (undo,redo): Busy cursor.
	* src/DataViews/_PersonView.py (delete_person_response): Busy cursor;
	Use reference map to find references to remove.


svn: r7940
This commit is contained in:
Alex Roitman 2007-01-20 17:21:45 +00:00
parent 832095aea5
commit 21688ae8d9
4 changed files with 19 additions and 14 deletions

View File

@ -1,11 +1,15 @@
2007-01-20 Alex Roitman <shura@gramps-project.org> 2007-01-20 Alex Roitman <shura@gramps-project.org>
* 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 * src/GrampsDb/_GrampsDbBase.py (transaction_commit): Remove
backend-specific call. backend-specific call.
* src/GrampsDb/_GrampsBSDDB.py (transaction_commit): Move surname * src/GrampsDb/_GrampsBSDDB.py (transaction_commit): Move surname
list build to work for any batch transaction. list build to work for any batch transaction.
* src/GrampsDb/_GrampsInMemDB.py (transaction_commit): Add method. * src/GrampsDb/_GrampsInMemDB.py (transaction_commit): Add method.
* src/Utils.py (profile): Accept and pass additional arguments. * 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 <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

View File

@ -192,16 +192,13 @@ class EventView(PageView.ListView):
def remove(self, obj): def remove(self, obj):
for ehandle in self.selected_handles(): for ehandle in self.selected_handles():
db = self.dbstate.db db = self.dbstate.db
person_list = [ person_list = [
h for h in item[1] for item in
db.get_person_handles(False) self.dbstate.db.find_backlink_handles(ehandle,['Person']) ]
if db.get_person_from_handle(h).has_handle_reference('Event',
ehandle) ]
family_list = [ family_list = [
h for h in item[1] for item in
db.get_family_handles() self.dbstate.db.find_backlink_handles(ehandle,['Family']) ]
if db.get_family_from_handle(h).has_handle_reference('Event',
ehandle) ]
event = db.get_event_from_handle(ehandle) event = db.get_event_from_handle(ehandle)

View File

@ -655,10 +655,10 @@ class PersonView(PageView.PersonNavView):
handle = self.active_person.get_handle() handle = self.active_person.get_handle()
person_list = [ person_list = [
phdl for phdl in self.dbstate.db.get_person_handles(False) item[1] for item in
if self.dbstate.db.get_person_from_handle(phdl).has_handle_reference('Person', self.dbstate.db.find_backlink_handles(handle,['Person'])]
handle) ]
for phandle in person_list: for phandle in person_list:
person = self.dbstate.db.get_person_from_handle(phandle) person = self.dbstate.db.get_person_from_handle(phandle)
person.remove_handle_references('Person', handle) person.remove_handle_references('Person', handle)

View File

@ -1045,10 +1045,14 @@ class ViewManager:
pass pass
def undo(self, obj): def undo(self, obj):
self.uistate.set_busy_cursor(1)
self.state.db.undo() self.state.db.undo()
self.uistate.set_busy_cursor(0)
def redo(self, obj): def redo(self, obj):
self.uistate.set_busy_cursor(1)
self.state.db.redo() self.state.db.redo()
self.uistate.set_busy_cursor(0)
def undo_history(self, obj): def undo_history(self, obj):
try: try: