* src/ChooseParents.py: redraw window properly after person add
svn: r4598
This commit is contained in:
parent
9c37651ddf
commit
1d1fab4eb9
@ -1,4 +1,5 @@
|
|||||||
2005-05-15 Don Allingham <don@gramps-project.org>
|
2005-05-15 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/ChooseParents.py: redraw window properly after person add
|
||||||
* src/DisplayModels.py: provide sorting support
|
* src/DisplayModels.py: provide sorting support
|
||||||
* src/PlaceView.py: add sorting by columns
|
* src/PlaceView.py: add sorting by columns
|
||||||
* src/SourceView.py: add sorting by columns
|
* src/SourceView.py: add sorting by columns
|
||||||
|
@ -90,6 +90,11 @@ class ChooseParents:
|
|||||||
self.parent_selected = 0
|
self.parent_selected = 0
|
||||||
self.renderer = gtk.CellRendererText()
|
self.renderer = gtk.CellRendererText()
|
||||||
|
|
||||||
|
db.connect('person-add', self.redraw)
|
||||||
|
db.connect('person-update', self.redraw)
|
||||||
|
db.connect('person-delete', self.redraw)
|
||||||
|
db.connect('person-rebuild', self.redraw2)
|
||||||
|
|
||||||
# set default filters
|
# set default filters
|
||||||
self.all_males_filter = GenericFilter.GenericFilter()
|
self.all_males_filter = GenericFilter.GenericFilter()
|
||||||
self.all_males_filter.add_rule(GenericFilter.IsMale([]))
|
self.all_males_filter.add_rule(GenericFilter.IsMale([]))
|
||||||
@ -278,6 +283,14 @@ class ChooseParents:
|
|||||||
"""Display the relevant portion of GRAMPS manual"""
|
"""Display the relevant portion of GRAMPS manual"""
|
||||||
gnome.help_display('gramps-manual','gramps-edit-quick')
|
gnome.help_display('gramps-manual','gramps-edit-quick')
|
||||||
|
|
||||||
|
def redraw(self,handle_list):
|
||||||
|
self.father_model.rebuild_data()
|
||||||
|
self.mother_model.rebuild_data()
|
||||||
|
|
||||||
|
def redraw2(self):
|
||||||
|
self.father_model.rebuild_data()
|
||||||
|
self.mother_model.rebuild_data()
|
||||||
|
|
||||||
def redrawf(self):
|
def redrawf(self):
|
||||||
"""Redraws the potential father list"""
|
"""Redraws the potential father list"""
|
||||||
self.father_model = PeopleModel.PeopleModel(self.db,self.father_filter)
|
self.father_model = PeopleModel.PeopleModel(self.db,self.father_filter)
|
||||||
@ -505,14 +518,12 @@ class ChooseParents:
|
|||||||
if self.type == RelLib.Family.CIVIL_UNION:
|
if self.type == RelLib.Family.CIVIL_UNION:
|
||||||
self.parent_relation_changed(self.prel)
|
self.parent_relation_changed(self.prel)
|
||||||
elif person.get_gender() == RelLib.Person.MALE:
|
elif person.get_gender() == RelLib.Person.MALE:
|
||||||
self.redrawf()
|
|
||||||
path = self.father_model.on_get_path(handle)
|
path = self.father_model.on_get_path(handle)
|
||||||
top_path = self.father_model.on_get_path(name)
|
top_path = self.father_model.on_get_path(name)
|
||||||
self.father_list.expand_row(top_path,0)
|
self.father_list.expand_row(top_path,0)
|
||||||
self.father_selection.select_path(path)
|
self.father_selection.select_path(path)
|
||||||
self.father_list.scroll_to_cell(path,None,1,0.5,0)
|
self.father_list.scroll_to_cell(path,None,1,0.5,0)
|
||||||
else:
|
else:
|
||||||
self.redrawm()
|
|
||||||
path = self.mother_model.on_get_path(handle)
|
path = self.mother_model.on_get_path(handle)
|
||||||
top_path = self.mother_model.on_get_path(name)
|
top_path = self.mother_model.on_get_path(name)
|
||||||
self.mother_list.expand_row(top_path,0)
|
self.mother_list.expand_row(top_path,0)
|
||||||
|
Loading…
Reference in New Issue
Block a user