Add option to suppress warning

This commit is contained in:
Nick Hall 2023-07-18 17:47:34 +01:00
parent de50bcf7e6
commit fb3378a096
5 changed files with 16 additions and 4 deletions

View File

@ -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)

View File

@ -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")

View File

@ -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)

View File

@ -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):

View File

@ -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()