* src/DisplayModels.py: Added ChildModel to handle the

child list in the Family View
* src/gramps_main.py: add column editor for Family View
* src/GrampsDbBase.py: add storing/retrieving child column order
* src/FamilyView.py: use new ChildModel
* src/PlaceView.py: removed unused index


svn: r3735
This commit is contained in:
Don Allingham
2004-11-18 20:21:06 +00:00
parent 284cc849c3
commit 3139f636f0
6 changed files with 172 additions and 62 deletions

View File

@ -1021,6 +1021,14 @@ class GrampsDbBase:
if self.metadata != None:
self.metadata['columns'] = list
def set_child_column_order(self,list):
"""
Stores the Person display common information in the
database's metadata.
"""
if self.metadata != None:
self.metadata['child_columns'] = list
def set_place_column_order(self,list):
"""
Stores the Place display common information in the
@ -1060,6 +1068,21 @@ class GrampsDbBase:
else:
return cols
def get_child_column_order(self):
"""
Returns the Person display common information stored in the
database's metadata.
"""
default = [(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(0,6),(0,7)]
if self.metadata == None:
return default
else:
cols = self.metadata.get('child_columns',default)
if len(cols) != len(default):
return cols + default[len(cols):]
else:
return cols
def get_place_column_order(self):
"""
Returns the Place display common information stored in the