diff libgui/src/gui-preferences.h @ 31640:e518e1f7e944

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?
author John W. Eaton <jwe@octave.org>
date Mon, 05 Dec 2022 10:17:17 -0500
parents 34c3cd39c4b9
children 5749674b826e
line wrap: on
line diff
--- 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