diff --git a/gramps/gen/config.py b/gramps/gen/config.py index b0920b5aa..68d6352f9 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -293,6 +293,7 @@ register('preferences.invalid-date-format', "%s") register('preferences.iprefix', 'I%04d') register('preferences.name-format', 1) register('preferences.place-format', 0) +register('preferences.place-title', False) register('preferences.patronimic-surname', False) register('preferences.no-given-text', "[%s]" % _("Missing Given Name")) register('preferences.no-record-text', "[%s]" % _("Missing Record")) diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 842def5c7..ec3b7b2d4 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -1013,6 +1013,12 @@ class GrampsPreferences(ConfigureDialog): grid.attach(obox, 1, row, 2, 1) row += 1 + # Legacy place title mode + self.add_checkbox(grid, + _("Display legacy place title field in editors"), + row, 'preferences.place-title', stop=3) + row += 1 + # Age precision: # precision=1 for "year", 2: "year, month" or 3: "year, month, days" obox = Gtk.ComboBoxText() diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index 00486cf09..725a9d96a 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -55,6 +55,7 @@ from ..widgets import (MonitoredEntry, PrivacyButton, MonitoredTagList, from gramps.gen.errors import ValidationError from gramps.gen.utils.place import conv_lat_lon from gramps.gen.display.place import displayer as place_displayer +from gramps.gen.config import config from ..dialog import ErrorDialog from ..glade import Glade @@ -105,9 +106,12 @@ class EditPlace(EditPrimary): def _setup_fields(self): - self.title = MonitoredEntry(self.top.get_object("place_title"), - self.obj.set_title, self.obj.get_title, - self.db.readonly) + if config.get('preferences.place-title'): + self.top.get_object("place_title").show() + self.top.get_object("place_title_label").show() + self.title = MonitoredEntry(self.top.get_object("place_title"), + self.obj.set_title, self.obj.get_title, + self.db.readonly) self.name = MonitoredEntry(self.top.get_object("name_entry"), self.obj.set_name, self.obj.get_name, diff --git a/gramps/gui/editors/editplaceref.py b/gramps/gui/editors/editplaceref.py index 6bd1dfd5c..011d534ab 100644 --- a/gramps/gui/editors/editplaceref.py +++ b/gramps/gui/editors/editplaceref.py @@ -35,6 +35,7 @@ from gramps.gen.lib import NoteType from gramps.gen.db import DbTxn from gramps.gen.errors import ValidationError from gramps.gen.utils.place import conv_lat_lon +from gramps.gen.config import config from gramps.gen.const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext @@ -102,9 +103,13 @@ class EditPlaceRef(EditReference): self.uistate, self.track, self.db.readonly) - self.title = MonitoredEntry(self.top.get_object("place_title"), - self.source.set_title, self.source.get_title, - self.db.readonly) + if config.get('preferences.place-title'): + self.top.get_object("place_title").show() + self.top.get_object("place_title_label").show() + self.title = MonitoredEntry(self.top.get_object("place_title"), + self.source.set_title, + self.source.get_title, + self.db.readonly) self.name = MonitoredEntry(self.top.get_object("name_entry"), self.source.set_name, self.source.get_name, diff --git a/gramps/gui/glade/editplace.glade b/gramps/gui/glade/editplace.glade index 1d3ae4645..a7d400eee 100644 --- a/gramps/gui/glade/editplace.glade +++ b/gramps/gui/glade/editplace.glade @@ -83,14 +83,14 @@ 4 6 - - True + False - 0 + True _Title: True center place_title + 0 0 @@ -101,11 +101,11 @@ True False - 0 L_atitude: True center lat_entry + 0 0 @@ -116,11 +116,11 @@ True False - 0 _Longitude: True center lon_entry + 0 2 @@ -129,8 +129,8 @@ - True True + True Full title of this place. True @@ -145,10 +145,10 @@ True False - 0 _ID: True gid + 0 0 @@ -209,9 +209,9 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 Code: True + 0 False @@ -285,8 +285,8 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 place|Name: + 0 0 @@ -297,8 +297,8 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 Type: + 0 2 @@ -341,8 +341,8 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 Tags: + 0 2 diff --git a/gramps/gui/glade/editplaceref.glade b/gramps/gui/glade/editplaceref.glade index 3fdf2d18d..e0a97c429 100644 --- a/gramps/gui/glade/editplaceref.glade +++ b/gramps/gui/glade/editplaceref.glade @@ -77,12 +77,12 @@ True False - 0 6 3 Reference information True center + 0 @@ -109,11 +109,11 @@ True False - 0 3 _Date: True center + 0 0 @@ -190,13 +190,13 @@ 6 12 - - True + False - 0 + True Title: True center + 0 0 @@ -207,10 +207,10 @@ True False - 0 Name: True center + 0 0 @@ -221,11 +221,11 @@ True False - 0 3 ID: True center + 0 0 @@ -236,9 +236,9 @@ True False - 0 Latitude: True + 0 0 @@ -269,12 +269,12 @@ 500 True False - 0 4 <b>Note:</b> Any changes in the enclosing place information will be reflected in the place itself, for places that it encloses. True fill True + 0 True @@ -293,10 +293,10 @@ True False - 0 Type: True center + 0 2 @@ -307,10 +307,10 @@ True False - 0 Longitude: True center + 0 2 @@ -368,8 +368,8 @@ - True True + True Full title of this place. True @@ -447,9 +447,9 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 Code: True + 0 False @@ -481,8 +481,8 @@ You can set these values via the Geography View by searching the place, or via a True False - 0 Tags: + 0 2