# HG changeset patch # User John W. Eaton # Date 1670253437 18000 # Node ID e518e1f7e944da41501ab2c341a55a13ed517b77 # Parent ca7d58406f827fbe1b6a1ac6ba4c7dd337105481 Backed out changeset 34c3cd39c4b9 Revert change because there is code that uses gui_pref.ignore, but only on MAC_OS: global_use_native_dialogs in gui-preferences-global.h. Are there others? diff -r ca7d58406f82 -r e518e1f7e944 libgui/src/gui-preferences.h --- a/libgui/src/gui-preferences.h Sun Dec 04 22:57:02 2022 -0500 +++ b/libgui/src/gui-preferences.h Mon Dec 05 10:17:17 2022 -0500 @@ -36,8 +36,9 @@ struct gui_pref { - gui_pref (const QString& key_arg, const QVariant& def_arg) - : key (key_arg), def (def_arg) + gui_pref (const QString& key_arg, const QVariant& def_arg, + const bool ignore_arg = false) + : key (key_arg), def (def_arg), ignore (ignore_arg) { } // No copying! @@ -50,6 +51,7 @@ const QString key; // the key name const QVariant def; // the default value + const bool ignore; // when true, ignore, i.e. always take default }; // The version for shortcuts, where the default value is stored as a diff -r ca7d58406f82 -r e518e1f7e944 libgui/src/gui-settings.h --- a/libgui/src/gui-settings.h Sun Dec 04 22:57:02 2022 -0500 +++ b/libgui/src/gui-settings.h Mon Dec 05 10:17:17 2022 -0500 @@ -75,6 +75,9 @@ QVariant value (const gui_pref& pref) const { + if (pref.ignore) + return pref.def; // ignore the current pref and always use default + return value (pref.key, pref.def); }