* 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 581989107b
commit 44a479b3d8
4 changed files with 19 additions and 14 deletions

View File

@ -1,11 +1,15 @@
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
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 <don@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py: add append_list task

View File

@ -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)

View File

@ -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)

View File

@ -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: