* src/ChooseParents.py: fix parent selection
* src/FamilyView.py: fix update of parents after selction * src/PeopleView.py: fix update of parents after selction * src/gramps_main.py: fix update of parents after selction * src/EditPerson.py: fix person id reference svn: r3244
This commit is contained in:
parent
4a3b978f9e
commit
72a04eef03
@ -1,3 +1,10 @@
|
||||
2004-06-28 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/ChooseParents.py: fix parent selection
|
||||
* src/FamilyView.py: fix update of parents after selction
|
||||
* src/PeopleView.py: fix update of parents after selction
|
||||
* src/gramps_main.py: fix update of parents after selction
|
||||
* src/EditPerson.py: fix person id reference
|
||||
|
||||
2004-06-28 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||
* src/DbPrompter.py: Add new class for new, existing, and import
|
||||
prompters. Enable opening any format on the startup.
|
||||
|
@ -299,6 +299,7 @@ class ChooseParents:
|
||||
def redrawf(self):
|
||||
"""Redraws the potential father list"""
|
||||
self.father_nsort = PeopleModel.PeopleModel(self.db)
|
||||
self.father_nsort.rebuild_data()
|
||||
self.father_model = gtk.TreeModelSort(self.father_nsort)
|
||||
self.father_list.set_model(self.father_model)
|
||||
|
||||
@ -310,6 +311,7 @@ class ChooseParents:
|
||||
def redrawm(self):
|
||||
"""Redraws the potential mother list"""
|
||||
self.mother_nsort = PeopleModel.PeopleModel(self.db)
|
||||
self.mother_nsort.rebuild_data()
|
||||
self.mother_model = gtk.TreeModelSort(self.mother_nsort)
|
||||
self.mother_list.set_model(self.mother_model)
|
||||
|
||||
|
@ -1790,7 +1790,8 @@ class EditPerson:
|
||||
person_bday = "99999999"
|
||||
|
||||
# First, see if the person needs to be moved forward in the list
|
||||
index = list.index(person)
|
||||
|
||||
index = list.index(person.get_id())
|
||||
target = index
|
||||
for i in range(index-1, -1, -1):
|
||||
other = self.db.try_to_find_person_from_id(list[i])
|
||||
|
@ -617,13 +617,13 @@ class FamilyView:
|
||||
except:
|
||||
DisplayTrace.DisplayTrace()
|
||||
|
||||
def spouse_after_edit(self,ep,trans):
|
||||
def spouse_after_edit(self,epo,trans):
|
||||
ap = self.parent.active_person
|
||||
if epo:
|
||||
self.parent.db.commit_person(epo.person,trans)
|
||||
n = epo.person.get_primary_name().get_regular_name()
|
||||
self.parent.db.add_transaction(trans,_("Add Person (%s)") % n)
|
||||
self.parent.people_view.remove_from_person_list(epo.person,epo.original_id)
|
||||
self.parent.people_view.remove_from_person_list(epo.person)
|
||||
self.parent.people_view.redisplay_person_list(epo.person)
|
||||
|
||||
self.parent.active_person = ap
|
||||
@ -679,7 +679,8 @@ class FamilyView:
|
||||
person.get_primary_name().set_surname_prefix(name[0])
|
||||
|
||||
try:
|
||||
EditPerson.EditPerson(self.parent, person, self.parent.db, self.new_child_after_edit)
|
||||
EditPerson.EditPerson(self.parent, person, self.parent.db,
|
||||
self.new_child_after_edit)
|
||||
except:
|
||||
DisplayTrace.DisplayTrace()
|
||||
|
||||
@ -1050,13 +1051,10 @@ class FamilyView:
|
||||
i += 1
|
||||
|
||||
event = self.parent.db.find_event_from_id(val[3])
|
||||
print event.serialize()
|
||||
if event:
|
||||
dval = event.get_date()
|
||||
else:
|
||||
dval = u''
|
||||
|
||||
print i,val[0],val[1],val[2],dval,status,val[3],child.get_id()
|
||||
self.child_model.set(iter,0,i,1,val[0],2,val[1],3,val[2],
|
||||
4,dval,5,status,6,val[6],7,child.get_id())
|
||||
|
||||
@ -1395,7 +1393,7 @@ class FamilyView:
|
||||
child_id = list[i]
|
||||
child = self.parent.db.try_to_find_person_from_id(child_id)
|
||||
birth_id = child.get_birth_id()
|
||||
birth = self.parent.db.try_to_find_event_from_id(birth_id)
|
||||
birth = self.parent.db.find_event_from_id(birth_id)
|
||||
if not birth:
|
||||
continue
|
||||
bday = birth.get_date_object()
|
||||
|
@ -158,12 +158,10 @@ class PeopleView:
|
||||
self.sort_model.set_visible_column(PeopleModel.COLUMN_VIEW)
|
||||
self.person_tree.set_model(self.sort_model)
|
||||
|
||||
def remove_from_person_list(self,person,old_id=None):
|
||||
def remove_from_person_list(self,person):
|
||||
"""Remove the selected person from the list. A person object is
|
||||
expected, not an ID"""
|
||||
if old_id == None:
|
||||
old_id = person.get_id()
|
||||
path = self.person_model.on_get_path(old_id)
|
||||
path = self.person_model.on_get_path(person.get_id())
|
||||
self.person_model.row_deleted(path)
|
||||
|
||||
def remove_from_history(self,person_id,old_id=None):
|
||||
|
@ -918,6 +918,10 @@ class Gramps:
|
||||
self.import_tool_callback()
|
||||
|
||||
def import_tool_callback(self):
|
||||
self.full_update()
|
||||
|
||||
def full_update(self):
|
||||
"""Brute force display update, updating all the pages"""
|
||||
self.people_view.person_model.rebuild_data()
|
||||
if Utils.wasHistory_broken():
|
||||
self.clear_history()
|
||||
@ -933,14 +937,6 @@ class Gramps:
|
||||
self.source_view.change_db(self.db)
|
||||
self.media_view.change_db(self.db)
|
||||
|
||||
def full_update(self):
|
||||
"""Brute force display update, updating all the pages"""
|
||||
self.place_view.change_db(self.db)
|
||||
self.people_view.change_db(self.db)
|
||||
self.source_view.change_db(self.db)
|
||||
self.media_view.change_db(self.db)
|
||||
self.toolbar.set_style(GrampsCfg.toolbar)
|
||||
|
||||
def update_display(self,changed):
|
||||
"""Incremental display update, update only the displayed page"""
|
||||
page = self.views.get_current_page()
|
||||
|
Loading…
Reference in New Issue
Block a user