diff gui/src/m-editor/file-editor.cc @ 14795:e3ae0850b105 gui

Fixed integrating debug menu in the editor window. * file-editor-interface.h: Removed methods for enabling/disabling debug mode. * file-editor-tab.cc: Renamed variable to meet coding style standards. * file-editor: Added get for the editors debug menu. * main-window: Added the same actions in the main windows as well the editors debug menu.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Thu, 21 Jun 2012 21:29:01 +0200
parents 85daba52b2d4
children 9d9eb9bac65e
line wrap: on
line diff
--- a/gui/src/m-editor/file-editor.cc	Thu Jun 21 20:18:30 2012 +0200
+++ b/gui/src/m-editor/file-editor.cc	Thu Jun 21 21:29:01 2012 +0200
@@ -25,13 +25,13 @@
 #include <QStyle>
 #include <QTextStream>
 
-file_editor::file_editor (QTerminal *terminal, main_window *mainWindow)
-  : file_editor_interface(terminal, mainWindow)
+file_editor::file_editor (QTerminal *terminal, main_window *m)
+  : file_editor_interface(terminal, m)
 {
   construct ();
 
   _terminal = terminal;
-  _main_window = mainWindow;
+  _main_window = m;
   setVisible (false);
 }
 
@@ -52,11 +52,17 @@
 }
 
 main_window *
-file_editor::mainWindow ()
+file_editor::get_main_window ()
 {
   return _main_window;
 }
 
+QMenu *
+file_editor::debug_menu ()
+{
+  return _debug_menu;
+}
+
 void
 file_editor::request_new_file ()
 {
@@ -100,18 +106,6 @@
 }
 
 void
-file_editor::handle_entered_debug_mode ()
-{
-
-}
-
-void
-file_editor::handle_quit_debug_mode ()
-{
-
-}
-
-void
 file_editor::request_undo ()
 {
   file_editor_tab *activeFileEditorTab = active_editor_tab ();
@@ -353,7 +347,7 @@
   _cut_action->setShortcutContext               (Qt::WindowShortcut);
   paste_action->setShortcut                     (QKeySequence::Paste);
   paste_action->setShortcutContext              (Qt::WindowShortcut);
-  run_action->setShortcut                       (Qt::SHIFT + Qt::Key_F5);
+  run_action->setShortcut                       (Qt::SHIFT + Qt::Key_R);
   run_action->setShortcutContext                (Qt::WindowShortcut);
   next_bookmark_action->setShortcut             (Qt::Key_F2);
   next_bookmark_action->setShortcutContext      (Qt::WindowShortcut);
@@ -407,17 +401,6 @@
   _menu_bar->addMenu (editMenu);
 
   _debug_menu = new QMenu (tr ("&Debug"), _menu_bar);
-  QAction * debug_continue = _debug_menu->addAction (tr ("Continue"));
-  debug_continue->setShortcut (Qt::Key_F5);
-  QAction * debug_step_into = _debug_menu->addAction (tr ("Step into"));
-  debug_step_into->setShortcut (Qt::Key_F9);
-  QAction * debug_step_over = _debug_menu->addAction (tr ("Next"));
-  debug_step_over->setShortcut (Qt::Key_F10);
-  QAction * debug_step_out = _debug_menu->addAction (tr ("Step out"));
-  debug_step_out->setShortcut (Qt::Key_F11);
-  _debug_menu->addSeparator ();
-  QAction * debug_quit = _debug_menu->addAction (tr ("Quit"));
-  debug_quit->setShortcut (Qt::Key_Escape);
   _menu_bar->addMenu (_debug_menu);
 
   QMenu *runMenu = new QMenu (tr ("&Run"), _menu_bar);