changeset 29474:34922160bda9

do not disable shortcuts for activating other widgets in console widget * main-window.cc (configure_shortcuts): always enable shortcuts for switching to other widgets * settings-dialog.ui: add tool tip for the preference that prevents conflicts between readline and global shortcuts with the shortcuts mentioned above that are never disabled
author Torsten Lilge <ttl-octave@mailbox.org>
date Wed, 31 Mar 2021 21:33:46 +0200
parents 6aafc1637e39
children e88444be8468
files libgui/src/main-window.cc libgui/src/settings-dialog.ui
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Wed Mar 31 18:43:46 2021 +0200
+++ b/libgui/src/main-window.cc	Wed Mar 31 21:33:46 2021 +0200
@@ -2803,15 +2803,16 @@
     scmgr.set_shortcut (m_show_editor_action, sc_main_window_show_editor, enable);
     scmgr.set_shortcut (m_show_documentation_action, sc_main_window_show_doc, enable);
     scmgr.set_shortcut (m_show_variable_editor_action, sc_main_window_show_variable_editor, enable);
+    scmgr.set_shortcut (m_reset_windows_action, sc_main_window_reset, enable);
     scmgr.set_shortcut (m_command_window_action, sc_main_window_command, enable);
-    scmgr.set_shortcut (m_history_action, sc_main_window_history, enable);
-    scmgr.set_shortcut (m_workspace_action, sc_main_window_workspace, enable);
-    scmgr.set_shortcut (m_file_browser_action, sc_main_window_file_browser, enable);
-    scmgr.set_shortcut (m_editor_action, sc_main_window_editor, enable);
-    scmgr.set_shortcut (m_documentation_action, sc_main_window_doc, enable);
-    scmgr.set_shortcut (m_variable_editor_action, sc_main_window_variable_editor, enable);
-    scmgr.set_shortcut (m_previous_dock_action, sc_main_window_previous_dock, enable);
-    scmgr.set_shortcut (m_reset_windows_action, sc_main_window_reset, enable);
+    // Switching to the other widgets (including the previous one) is always enabled
+    scmgr.set_shortcut (m_history_action, sc_main_window_history, true);
+    scmgr.set_shortcut (m_workspace_action, sc_main_window_workspace, true);
+    scmgr.set_shortcut (m_file_browser_action, sc_main_window_file_browser, true);
+    scmgr.set_shortcut (m_editor_action, sc_main_window_editor, true);
+    scmgr.set_shortcut (m_documentation_action, sc_main_window_doc, true);
+    scmgr.set_shortcut (m_variable_editor_action, sc_main_window_variable_editor, true);
+    scmgr.set_shortcut (m_previous_dock_action, sc_main_window_previous_dock, true);
 
     // help menu
     scmgr.set_shortcut (m_ondisk_doc_action, sc_main_help_ondisk_doc, enable);
--- a/libgui/src/settings-dialog.ui	Wed Mar 31 18:43:46 2021 +0200
+++ b/libgui/src/settings-dialog.ui	Wed Mar 31 21:33:46 2021 +0200
@@ -31,8 +31,11 @@
        <height>0</height>
       </size>
      </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Disable global shortcuts in order to prevent interference with readline key strokes. Exceptions: Ctrl-C for interrupting the interpreter and the shortcuts for switching to other widgets.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
      <property name="currentIndex">
-      <number>2</number>
+      <number>6</number>
      </property>
      <widget class="QWidget" name="tab_general">
       <property name="enabled">