* src/PeopleView.py: broken out of gramps_main.py, fixed
add/delete * src/gramps_main.py: people view removed, fixed add/delete svn: r2193
This commit is contained in:
parent
0976832359
commit
7dc6df853a
@ -153,7 +153,8 @@ class PeopleView:
|
||||
del_id = pid
|
||||
|
||||
if self.id2col.has_key(del_id):
|
||||
model.remove(self.id2iter[del_id])
|
||||
(model,iter) = self.id2col[del_id]
|
||||
model.remove(iter)
|
||||
del self.id2col[del_id]
|
||||
|
||||
if person == self.parent.active_person:
|
||||
@ -189,7 +190,7 @@ class PeopleView:
|
||||
self.id2col[key] = (model,iter)
|
||||
|
||||
if change:
|
||||
self.change_active_person(person)
|
||||
self.parent.change_active_person(person)
|
||||
self.goto_active_person()
|
||||
model.sort()
|
||||
|
||||
@ -372,4 +373,7 @@ class PeopleView:
|
||||
menu.append(item)
|
||||
menu.popup(None,None,None,0,0)
|
||||
|
||||
def redisplay_person_list(self,person):
|
||||
self.add_to_person_list(person,1)
|
||||
|
||||
|
||||
|
@ -642,7 +642,7 @@ class Gramps:
|
||||
page = self.views.get_current_page()
|
||||
if page == PERSON_VIEW:
|
||||
|
||||
mlist = self.person_tree.get_selected_objects()
|
||||
mlist = self.people_view.person_tree.get_selected_objects()
|
||||
|
||||
if len(mlist) != 2:
|
||||
msg = _("Cannot merge people.")
|
||||
@ -1423,7 +1423,7 @@ class Gramps:
|
||||
|
||||
def load_selected_people(self,obj):
|
||||
"""Display the selected people in the EditPerson display"""
|
||||
mlist = self.person_tree.get_selected_objects()
|
||||
mlist = self.people_view.person_tree.get_selected_objects()
|
||||
if mlist and self.active_person == self.db.getPerson(mlist[0]):
|
||||
self.load_person(self.active_person)
|
||||
|
||||
@ -1442,7 +1442,7 @@ class Gramps:
|
||||
DisplayTrace.DisplayTrace()
|
||||
|
||||
def delete_person_clicked(self,obj):
|
||||
mlist = self.person_tree.get_selected_objects()
|
||||
mlist = self.people_view.person_tree.get_selected_objects()
|
||||
|
||||
for sel in mlist:
|
||||
p = self.db.getPerson(sel)
|
||||
@ -1481,8 +1481,8 @@ class Gramps:
|
||||
family.removeChild(self.active_person)
|
||||
|
||||
self.db.removePerson(self.active_person.getId())
|
||||
self.remove_from_person_list(self.active_person)
|
||||
self.person_model.sort_column_changed()
|
||||
self.people_view.remove_from_person_list(self.active_person)
|
||||
self.people_view.person_model.sort_column_changed()
|
||||
try:
|
||||
self.mhistory = self.mhistory[:-2]
|
||||
self.change_active_person(self.mhistory[-2])
|
||||
@ -1493,9 +1493,9 @@ class Gramps:
|
||||
Utils.modified()
|
||||
|
||||
def merge_update(self,p1,p2,old_id):
|
||||
self.remove_from_person_list(p1,old_id)
|
||||
self.remove_from_person_list(p2)
|
||||
self.redisplay_person_list(p1)
|
||||
self.people_view.remove_from_person_list(p1,old_id)
|
||||
self.people_view.remove_from_person_list(p2)
|
||||
self.people_view.redisplay_person_list(p1)
|
||||
self.update_display(0)
|
||||
|
||||
def goto_active_person(self,first=0):
|
||||
@ -1784,10 +1784,6 @@ class Gramps:
|
||||
self.people_view.redisplay_person_list(person)
|
||||
self.update_display(0)
|
||||
|
||||
|
||||
def redisplay_person_list(self,person):
|
||||
self.people_view.add_to_person_list(person,1)
|
||||
|
||||
def load_person(self,person):
|
||||
if person:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user