diff libgui/src/settings-dialog.cc @ 29084:2a70a068c4ab

add option for using alt-modifer in command windows readline (bug #59478) * gui-preferences-sc.h: key and default value for new pref for disabling menu accelerators when command window has focus * main-window.cc (main_window): initial new boolean class variable storing the pref for disabling the menu accelerators; (focus_changed): check for editor and command window getting or losing focus and en-/disable menu accelerators accordingly; (notice_settings): get new preference, disable menu accelerators if desired and if command window has focus (construct): remove connection of editor focus changed signal with the slot in main window since the related slot is now directly called from focus_changed if required * main-window.h: new class variable m_prevent_readline_conflicts_menu * settings-dialog.cc (settings_dialog) read new pref and initialize the related check box; (write_changed_settings): store state of the check box in pref file * settings-dialog.ui: added check box for new preference
author Torsten Lilge <ttl-octave@mailbox.org>
date Fri, 20 Nov 2020 20:02:29 +0100
parents ed8d11b1027d
children d9ac99164c18
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc	Fri Nov 20 18:22:56 2020 +0100
+++ b/libgui/src/settings-dialog.cc	Fri Nov 20 20:02:29 2020 +0100
@@ -458,6 +458,9 @@
     cb_prevent_readline_conflicts->setChecked (
           settings->value (sc_prevent_rl_conflicts.key,
                            sc_prevent_rl_conflicts.def).toBool ());
+    cb_prevent_readline_conflicts_menu->setChecked (
+          settings->value (sc_prevent_rl_conflicts_menu.key,
+                           sc_prevent_rl_conflicts_menu.def).toBool ());
 
     // initialize the tree view with all shortcut data
     scmgr.fill_treewidget (shortcuts_treewidget);
@@ -1072,6 +1075,7 @@
     // shortcuts
 
     settings->setValue (sc_prevent_rl_conflicts.key, cb_prevent_readline_conflicts->isChecked ());
+    settings->setValue (sc_prevent_rl_conflicts_menu.key, cb_prevent_readline_conflicts_menu->isChecked ());
     shortcut_manager& scmgr = m_octave_qobj.get_shortcut_manager ();
     scmgr.write_shortcuts (settings, closing);