Add Phone/Postal to Addresses tab of Person editor

Fixes #11600
This commit is contained in:
Brian McCullough 2020-03-07 08:54:25 -06:00 committed by Nick Hall
parent 00fa6d472a
commit 00121d1456
2 changed files with 8 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class AddrEmbedList(EmbeddedList):
Derives from the EmbeddedList class.
"""
_HANDLE_COL = 7
_HANDLE_COL = 9
_DND_TYPE = DdTargets.ADDRESS
_MSG = {
@ -74,7 +74,9 @@ class AddrEmbedList(EmbeddedList):
(_('City'), 3, 100, TEXT_COL, -1, None),
(_('State/County'), 4, 100, TEXT_COL, -1, None),
(_('Country'), 5, 75, TEXT_COL, -1, None),
(_('Private'), 6, 30, ICON_COL, -1, 'gramps-lock')
(_("postal"), 6, 75, TEXT_COL, -1, None),
(_("phone"), 7, 150, TEXT_COL, -1, None),
(_('Private'), 8, 30, ICON_COL, -1, 'gramps-lock')
]
def __init__(self, dbstate, uistate, track, data):
@ -98,7 +100,7 @@ class AddrEmbedList(EmbeddedList):
"""
Return the column order of the columns in the display tab.
"""
return ((1,6), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5))
return ((1,8), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7))
def add_button_clicked(self, obj):
"""

View File

@ -50,7 +50,7 @@ class AddressModel(Gtk.ListStore):
"""
AddressModel derives from the ListStore, defining te items in the list
"""
Gtk.ListStore.__init__(self, str, str, str, str, str, str, bool, object)
Gtk.ListStore.__init__(self, str, str, str, str, str, str, str, str, bool, object)
self.db = dbase
for obj in obj_list:
self.append(row=[
@ -60,6 +60,8 @@ class AddressModel(Gtk.ListStore):
obj.city,
obj.state,
obj.country,
obj.postal,
obj.phone,
obj.get_privacy(),
obj,
])