From fb3378a096c7dd6403cbe4b87044f6b2729446a1 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 18 Jul 2023 17:47:34 +0100 Subject: [PATCH] Add option to suppress warning --- gramps/gen/config.py | 1 + gramps/gui/clipboard.py | 4 +++- gramps/gui/configure.py | 8 +++++++- gramps/gui/editors/filtereditor.py | 3 ++- gramps/gui/views/tags.py | 4 +++- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gramps/gen/config.py b/gramps/gen/config.py index 882d1d1a2..faf9e11b3 100644 --- a/gramps/gen/config.py +++ b/gramps/gen/config.py @@ -146,6 +146,7 @@ register('behavior.max-age-prob-alive', 110) register('behavior.max-sib-age-diff', 20) register('behavior.min-generation-years', 13) register('behavior.owner-warn', False) +register('behavior.immediate-warn', False) register('behavior.pop-plugin-status', False) register('behavior.recent-export-type', 3) register('behavior.runcheck', False) diff --git a/gramps/gui/clipboard.py b/gramps/gui/clipboard.py index 6792b2b18..d62892034 100644 --- a/gramps/gui/clipboard.py +++ b/gramps/gui/clipboard.py @@ -59,6 +59,7 @@ from .ddtargets import DdTargets from .makefilter import make_filter from .utils import is_right_click, no_match_primary_mask from gramps.gen.const import GRAMPS_LOCALE as glocale +from gramps.gen.config import config from gramps.gui.widgets.persistenttreeview import PersistentTreeView _ = glocale.translation.sgettext @@ -1374,7 +1375,8 @@ class ClipboardWindow(ManagedWindow): self.top = Glade() self.set_window(self.top.toplevel, None, None, msg=_("Clipboard")) self.setup_configs('interface.clipboard', 500, 300) - self.get_window().set_tooltip_text(_("Any changes are instantly saved")) + if not config.get('behavior.immediate-warn'): + self.get_window().set_tooltip_text(_("Any changes are saved immediately")) self.clear_all_btn = self.top.get_object("btn_clear_all") self.clear_btn = self.top.get_object("btn_clear") diff --git a/gramps/gui/configure.py b/gramps/gui/configure.py index 5e0649c99..0405700d1 100644 --- a/gramps/gui/configure.py +++ b/gramps/gui/configure.py @@ -193,7 +193,8 @@ class ConfigureDialog(ManagedWindow): self.window.vbox.pack_start(self.panel, True, True, 0) self.__on_close = on_close self.window.connect('response', self.done) - self.window.set_tooltip_text(_("Any changes are instantly saved")) + if not config.get('behavior.immediate-warn'): + self.window.set_tooltip_text(_("Any changes are saved immediately")) self.__setup_pages(configure_page_funcs) @@ -837,6 +838,11 @@ class GrampsPreferences(ConfigureDialog): ' exporting to GEDCOM'), row, 'behavior.owner-warn', start=1) row += 1 + self.add_checkbox( + grid, _('Suppress tooltip warnings about data being saved' + ' immediately'), + row, 'behavior.immediate-warn', start=1) + row += 1 self.add_checkbox( grid, _('Show plugin status dialog on plugin load error'), row, 'behavior.pop-plugin-status', start=1) diff --git a/gramps/gui/editors/filtereditor.py b/gramps/gui/editors/filtereditor.py index cbcb220a4..8776a6854 100644 --- a/gramps/gui/editors/filtereditor.py +++ b/gramps/gui/editors/filtereditor.py @@ -1143,7 +1143,8 @@ class FilterEditor(ManagedWindow): self.draw_filters() self._set_size() self.filter_list.restore_column_size() - self.get_window().set_tooltip_text(_("Any changes are instantly saved")) + if not config.get('behavior.immediate-warn'): + self.get_window().set_tooltip_text(_("Any changes are saved immediately")) self.show() def build_menu_names(self, obj): diff --git a/gramps/gui/views/tags.py b/gramps/gui/views/tags.py index ff4318d2d..5e58202f1 100644 --- a/gramps/gui/views/tags.py +++ b/gramps/gui/views/tags.py @@ -52,6 +52,7 @@ from ..dialog import ErrorDialog, QuestionDialog2 import gramps.gui.widgets.progressdialog as progressdlg from ..uimanager import ActionGroup from ..managedwindow import ManagedWindow +from gramps.gen.config import config #------------------------------------------------------------------------- # @@ -384,7 +385,8 @@ class OrganizeTagsDialog(ManagedWindow): self.top = self._create_dialog() self.set_window(self.top, None, _('Organize Tags')) self.setup_configs('interface.organizetagsdialog', 400, 350) - self.get_window().set_tooltip_text(_("Any changes are instantly saved")) + if not config.get('behavior.immediate-warn'): + self.get_window().set_tooltip_text(_("Any changes are saved immediately")) self.show() self.run()