From 00121d14561fb828ffffbf8fde5b69cf3f622112 Mon Sep 17 00:00:00 2001 From: Brian McCullough Date: Sat, 7 Mar 2020 08:54:25 -0600 Subject: [PATCH] Add Phone/Postal to Addresses tab of Person editor Fixes #11600 --- gramps/gui/editors/displaytabs/addrembedlist.py | 8 +++++--- gramps/gui/editors/displaytabs/addressmodel.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gramps/gui/editors/displaytabs/addrembedlist.py b/gramps/gui/editors/displaytabs/addrembedlist.py index f49267245..14bfe8f5c 100644 --- a/gramps/gui/editors/displaytabs/addrembedlist.py +++ b/gramps/gui/editors/displaytabs/addrembedlist.py @@ -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): """ diff --git a/gramps/gui/editors/displaytabs/addressmodel.py b/gramps/gui/editors/displaytabs/addressmodel.py index 3f3c6eec3..2c1a81063 100644 --- a/gramps/gui/editors/displaytabs/addressmodel.py +++ b/gramps/gui/editors/displaytabs/addressmodel.py @@ -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, ])