* src/EventView.py (column_names): Add missing column

* src/RepositoryView.py (column_names): Add missing columns
* src/GrampsDbBase.py: fix column_order methods
* src/DisplayModels.py (RepositoryModel): Remove parish column because it is not editable anyway


svn: r4805
This commit is contained in:
Martin Hawlisch 2005-06-08 15:35:31 +00:00
parent 4575a43faa
commit ac91138900
5 changed files with 26 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2005-06-08 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/EventView.py (column_names): Add missing column
* src/RepositoryView.py (column_names): Add missing columns
* src/GrampsDbBase.py: fix column_order methods
* src/DisplayModels.py (RepositoryModel): Remove parish column because
it is not editable anyway
2005-06-08 Alex Roitman <shura@gramps-project.org> 2005-06-08 Alex Roitman <shura@gramps-project.org>
* src/ChooseParens.py: Support for (int,str) relationships. * src/ChooseParens.py: Support for (int,str) relationships.
* src/FamilyView.py (new_child_after_edit): Use tuple relationships. * src/FamilyView.py (new_child_after_edit): Use tuple relationships.

View File

@ -574,7 +574,6 @@ class RepositoryModel(BaseModel):
self.column_id, self.column_id,
self.column_type, self.column_type,
self.column_home_url, self.column_home_url,
self.column_parish,
self.column_postal_code, self.column_postal_code,
self.column_city, self.column_city,
self.column_county, self.column_county,
@ -589,7 +588,6 @@ class RepositoryModel(BaseModel):
self.column_id, self.column_id,
self.column_type, self.column_type,
self.column_home_url, self.column_home_url,
self.column_parish,
self.column_postal_code, self.column_postal_code,
self.column_city, self.column_city,
self.column_county, self.column_county,
@ -621,12 +619,6 @@ class RepositoryModel(BaseModel):
def column_name(self,data): def column_name(self,data):
return unicode(data[3]) return unicode(data[3])
def column_parish(self,data):
try:
return data[4].get_parish()
except:
return u''
def column_city(self,data): def column_city(self,data):
try: try:
return data[4].get_city() return data[4].get_city()

View File

@ -50,6 +50,7 @@ column_names = [
_('Description'), _('Description'),
_('ID'), _('ID'),
_('Type'), _('Type'),
_('Last Change'),
_('Date'), _('Date'),
_('Place'), _('Place'),
_('Cause'), _('Cause'),

View File

@ -1299,14 +1299,21 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
""" """
self._set_column_order(col_list,SOURCE_COL_KEY) self._set_column_order(col_list,SOURCE_COL_KEY)
def set_media_column_order(self,list): def set_media_column_order(self,col_list):
""" """
Stores the Media display common information in the Stores the Media display common information in the
database's metadata. database's metadata.
""" """
self._set_column_order(col_list,MEDIA_COL_KEY) self._set_column_order(col_list,MEDIA_COL_KEY)
def set_repository_column_order(self,list): def set_event_column_order(self,col_list):
"""
Stores the Event display common information in the
database's metadata.
"""
self._set_column_order(col_list,EVENT_COL_KEY)
def set_repository_column_order(self,col_list):
""" """
Stores the Repository display common information in the Stores the Repository display common information in the
database's metadata. database's metadata.
@ -1360,7 +1367,7 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
Returns the MediaObject display common information stored in the Returns the MediaObject display common information stored in the
database's metadata. database's metadata.
""" """
default = [(1,1),(0,5),(0,6),(1,2),(1,3),(0,4)] default = [(1,1),(1,2),(1,3),(1,5),(0,4)]
return self._get_column_order(MEDIA_COL_KEY,default) return self._get_column_order(MEDIA_COL_KEY,default)
def get_event_column_order(self): def get_event_column_order(self):
@ -1376,7 +1383,7 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
Returns the Repository display common information stored in the Returns the Repository display common information stored in the
database's metadata. database's metadata.
""" """
default = [(1,1),(0,5),(0,6),(1,2),(1,3),(0,4)] default = [(1,1),(0,5),(0,6),(1,2),(1,3),(0,4),(0,7),(0,8),(0,9),(0,10)]
return self._get_column_order(REPOSITORY_COL_KEY,default) return self._get_column_order(REPOSITORY_COL_KEY,default)
class Transaction: class Transaction:
@ -1481,5 +1488,3 @@ class Transaction:
if self.last and self.first: if self.last and self.first:
return self.last - self.first + 1 return self.last - self.first + 1
return 0 return 0

View File

@ -52,6 +52,13 @@ column_names = [
_('ID'), _('ID'),
_('Type'), _('Type'),
_('Home URL'), _('Home URL'),
_('ZIP/Postal Code'),
_('City'),
_('County'),
_('State'),
_('Country'),
_('Email'),
_('Search URL'),
] ]
_HANDLE_COL = 12 _HANDLE_COL = 12