diff libgui/src/shortcut-manager.cc @ 18707:f31fde98c872 gui-release

use shortcut manager for the window menu * main-window.cc (construct_window_menu_item): add action and connect its slot; (construct_window_menu): created menu actions are class variables, removed calls to connect which are now obsolete here; (set_global_shortcuts): call shortcut manager for setting the shortcuts * main-window.h: construct_window_menu_item with other parameters, window actions as class variables * shirtcut-manger.cc (do_init_data): insert debug actions into the list
author Torsten <ttl@justmail.de>
date Wed, 30 Apr 2014 19:33:55 +0200
parents 908523bd79b4
children 584b20e9112c
line wrap: on
line diff
--- a/libgui/src/shortcut-manager.cc	Mon Apr 28 22:48:28 2014 +0200
+++ b/libgui/src/shortcut-manager.cc	Wed Apr 30 19:33:55 2014 +0200
@@ -109,6 +109,23 @@
   init (tr ("Continue"), "main_debug:continue", QKeySequence (Qt::Key_F5));
   init (tr ("Quit Debug Mode"), "main_debug:quit", QKeySequence (Qt::ShiftModifier + Qt::Key_F5));
 
+  // window
+  QKeySequence ctrl = Qt::ControlModifier;
+  QKeySequence ctrl_shift = Qt::ControlModifier + Qt::ShiftModifier;
+  init (tr ("Show Command Window"), "main_window:show_command", ctrl_shift + Qt::Key_0);
+  init (tr ("Show Command History"), "main_window:show_history", ctrl_shift + Qt::Key_1);
+  init (tr ("Show File Browser"), "main_window:show_file_browser", ctrl_shift + Qt::Key_2);
+  init (tr ("Show Workspace"), "main_window:show_workspace", ctrl_shift + Qt::Key_3);
+  init (tr ("Show Editor"), "main_window:show_editor", ctrl_shift + Qt::Key_4);
+  init (tr ("Show Documentation"), "main_window:show_doc", ctrl_shift + Qt::Key_5);
+  init (tr ("Command Window"), "main_window:command", ctrl + Qt::Key_0);
+  init (tr ("Command History"), "main_window:history", ctrl + Qt::Key_1);
+  init (tr ("File Browser"), "main_window:file_browser", ctrl + Qt::Key_2);
+  init (tr ("Workspace"), "main_window:workspace", ctrl + Qt::Key_3);
+  init (tr ("Editor"), "main_window:editor", ctrl + Qt::Key_4);
+  init (tr ("Documentation"), "main_window:doc", ctrl + Qt::Key_5);
+  init (tr ("Reset Window Layout"), "main_window:reset", QKeySequence ());
+
   // actions of the editor
 
   // file