GEPS 006: Add Locality to researcher

svn: r16082
This commit is contained in:
Nick Hall
2010-10-29 23:11:08 +00:00
parent 8f37b38c73
commit 9c14d3b487
12 changed files with 164 additions and 93 deletions

View File

@@ -426,12 +426,13 @@ class GrampsPreferences(ConfigureDialog):
table.set_row_spacings(6)
self.add_entry(table, _('Name'), 0, 'researcher.researcher-name')
self.add_entry(table, _('Address'), 1, 'researcher.researcher-addr')
self.add_entry(table, _('City'), 2, 'researcher.researcher-city')
self.add_entry(table, _('State/Province'), 3, 'researcher.researcher-state')
self.add_entry(table, _('Country'), 4, 'researcher.researcher-country')
self.add_entry(table, _('ZIP/Postal Code'), 5, 'researcher.researcher-postal')
self.add_entry(table, _('Phone'), 6, 'researcher.researcher-phone')
self.add_entry(table, _('Email'), 7, 'researcher.researcher-email')
self.add_entry(table, _('Locality'), 2, 'researcher.researcher-locality')
self.add_entry(table, _('City'), 3, 'researcher.researcher-city')
self.add_entry(table, _('State/County'), 4, 'researcher.researcher-state')
self.add_entry(table, _('Country'), 5, 'researcher.researcher-country')
self.add_entry(table, _('ZIP/Postal Code'), 6, 'researcher.researcher-postal')
self.add_entry(table, _('Phone'), 7, 'researcher.researcher-phone')
self.add_entry(table, _('Email'), 8, 'researcher.researcher-email')
return _('Researcher'), table
def add_prefix_panel(self, configdialog):

View File

@@ -63,11 +63,11 @@ class RepositoryModel(FlatBaseModel):
self.column_type,
self.column_home_url,
self.column_street,
self.column_postal_code,
self.column_locality,
self.column_city,
self.column_county,
self.column_state,
self.column_country,
self.column_postal_code,
self.column_email,
self.column_search_url,
self.column_change,
@@ -81,11 +81,11 @@ class RepositoryModel(FlatBaseModel):
self.column_type,
self.column_home_url,
self.column_street,
self.column_postal_code,
self.column_locality,
self.column_city,
self.column_county,
self.column_state,
self.column_country,
self.column_postal_code,
self.column_email,
self.column_search_url,
self.sort_change,
@@ -132,12 +132,12 @@ class RepositoryModel(FlatBaseModel):
except:
return u''
def column_county(self,data):
def column_locality(self,data):
try:
if data[5]:
addr = gen.lib.Address()
addr.unserialize(data[5][0])
return addr.get_county()
return addr.get_locality()
else:
return u''
except: