Provide an option to "hide" the LDS tab

Immplements #3872.
This commit is contained in:
Mathieu 2019-11-06 21:22:01 +01:00 committed by Nick Hall
parent ec5afcf45e
commit 7bfbec139f
4 changed files with 10 additions and 2 deletions

View File

@ -220,6 +220,7 @@ register('interface.size-checked', False)
register('interface.statusbar', 1)
register('interface.toolbar-on', True)
register('interface.toolbar-text', False)
register('interface.hide-lds', False)
register('interface.view', True)
register('interface.surname-box-height', 150)
register('interface.treemodel-cache-size', 1000)

View File

@ -1374,6 +1374,11 @@ class GrampsPreferences(ConfigureDialog):
grid.attach(lwidget, 1, row, 1, 1)
grid.attach(obox, 2, row, 2, 1)
row += 1
self.add_checkbox(grid,
_('Hide LDS tab in person and family editors'),
row, 'interface.hide-lds')
row += 1
label = self.add_text(
grid, _("* Requires Restart"), row,

View File

@ -793,7 +793,8 @@ class EditFamily(EditPrimary):
self.uistate,
self.track,
self.obj.get_lds_ord_list())
self._add_tab(notebook, self.lds_embed)
if not (config.get('interface.hide-lds') and self.lds_embed.is_empty()):
self._add_tab(notebook, self.lds_embed)
self.track_ref_for_deletion("lds_embed")
self._setup_notebook_tabs( notebook)

View File

@ -529,7 +529,8 @@ class EditPerson(EditPrimary):
self.uistate,
self.track,
self.obj.get_lds_ord_list())
self._add_tab(notebook, self.lds_list)
if not (config.get('interface.hide-lds') and self.lds_list.is_empty()):
self._add_tab(notebook, self.lds_list)
self.track_ref_for_deletion("lds_list")
self.backref_tab = PersonBackRefList(self.dbstate,