# HG changeset patch # User Torsten # Date 1392326264 -3600 # Node ID f959c63934e6c9485f002117c35db3c7f7c3760c # Parent f01ac1bb8a5d97f0899ce7250564d43db64d3f77 Backed out changeset f01ac1bb8a5d which broke some editor short cuts diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Feb 13 22:17:44 2014 +0100 @@ -767,37 +767,6 @@ void -file_editor_tab::zoom_in (const QWidget *ID) -{ - if (ID != this) - return; - - _edit_area->zoomIn (1); - auto_margin_width (); -} - -void -file_editor_tab::zoom_out (const QWidget *ID) -{ - if (ID != this) - return; - - _edit_area->zoomOut (1); - auto_margin_width (); -} - -void -file_editor_tab::zoom_normal (const QWidget *ID) -{ - if (ID != this) - return; - - _edit_area->zoomTo (0); - auto_margin_width (); -} - - -void file_editor_tab::handle_find_dialog_finished (int) { // Find dialog is going to hide. Save location of window for diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/file-editor-tab.h --- a/libgui/src/m-editor/file-editor-tab.h Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/file-editor-tab.h Thu Feb 13 22:17:44 2014 +0100 @@ -97,10 +97,6 @@ void indent_selected_text (const QWidget *ID); void unindent_selected_text (const QWidget *ID); - void zoom_in (const QWidget *ID); - void zoom_out (const QWidget *ID); - void zoom_normal (const QWidget *ID); - void find (const QWidget *ID); void goto_line (const QWidget *ID, int line = -1); diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/file-editor.cc --- a/libgui/src/m-editor/file-editor.cc Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/file-editor.cc Thu Feb 13 22:17:44 2014 +0100 @@ -825,24 +825,6 @@ } void -file_editor::zoom_in (bool) -{ - emit fetab_zoom_in (_tab_widget->currentWidget ()); -} - -void -file_editor::zoom_out (bool) -{ - emit fetab_zoom_out (_tab_widget->currentWidget ()); -} - -void -file_editor::zoom_normal (bool) -{ - emit fetab_zoom_normal (_tab_widget->currentWidget ()); -} - -void file_editor::handle_editor_state_changed (bool copy_available, const QString& file_name) { @@ -1131,15 +1113,6 @@ this, SLOT (request_styles_preferences (bool))); _menu_bar->addMenu (editMenu); - QMenu *view_menu = new QMenu (tr ("&View"), _menu_bar); - _zoom_in_action = view_menu->addAction (QIcon (), tr ("Zoom &In"), - this, SLOT (zoom_in (bool))); - _zoom_out_action = view_menu->addAction (QIcon (), tr ("Zoom &Out"), - this, SLOT (zoom_out (bool))); - _zoom_normal_action = view_menu->addAction (QIcon (), tr ("&Normal Size"), - this, SLOT (zoom_normal (bool))); - _menu_bar->addMenu (view_menu); - _debug_menu = new QMenu (tr ("&Debug"), _menu_bar); _debug_menu->addAction (toggle_breakpoint_action); _debug_menu->addAction (next_breakpoint_action); @@ -1360,13 +1333,6 @@ connect (this, SIGNAL (fetab_paste (const QWidget*)), f, SLOT (paste (const QWidget*))); - connect (this, SIGNAL (fetab_zoom_in (const QWidget*)), - f, SLOT (zoom_in (const QWidget*))); - connect (this, SIGNAL (fetab_zoom_out (const QWidget*)), - f, SLOT (zoom_out (const QWidget*))); - connect (this, SIGNAL (fetab_zoom_normal (const QWidget*)), - f, SLOT (zoom_normal (const QWidget*))); - connect (this, SIGNAL (fetab_context_help (const QWidget*, bool)), f, SLOT (context_help (const QWidget*, bool))); @@ -1490,11 +1456,6 @@ _context_help_action->setShortcut (QKeySequence::HelpContents); _context_doc_action->setShortcut (Qt::SHIFT + Qt::Key_F1); - _zoom_in_action->setShortcut (QKeySequence::ZoomIn); - _zoom_out_action->setShortcut (QKeySequence::ZoomOut); - _zoom_normal_action->setShortcut (Qt::ControlModifier - + Qt::AltModifier + Qt::Key_0); - _find_action->setShortcut (QKeySequence::Find); _goto_line_action->setShortcut (Qt::ControlModifier+ Qt::Key_G); @@ -1529,10 +1490,6 @@ _paste_action->setShortcut (no_key); _context_help_action->setShortcut (no_key); - _zoom_in_action->setShortcut (no_key); - _zoom_out_action->setShortcut (no_key); - _zoom_normal_action->setShortcut (no_key); - _find_action->setShortcut (no_key); _goto_line_action->setShortcut (no_key); @@ -1569,10 +1526,6 @@ _context_help_action->setEnabled (have_tabs); _context_doc_action->setEnabled (have_tabs); - _zoom_in_action->setEnabled (have_tabs); - _zoom_out_action->setEnabled (have_tabs); - _zoom_normal_action->setEnabled (have_tabs); - _find_action->setEnabled (have_tabs); _goto_line_action->setEnabled (have_tabs); diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/file-editor.h --- a/libgui/src/m-editor/file-editor.h Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/file-editor.h Thu Feb 13 22:17:44 2014 +0100 @@ -102,11 +102,6 @@ void fetab_do_breakpoint_marker (bool insert, const QWidget* ID, int line = -1); void fetab_set_focus (const QWidget* ID); - - void fetab_zoom_in (const QWidget* ID); - void fetab_zoom_out (const QWidget* ID); - void fetab_zoom_normal (const QWidget* ID); - void request_settings_dialog (const QString&); void execute_command_in_terminal_signal (const QString&); void file_loaded_signal (); @@ -195,10 +190,6 @@ void request_styles_preferences (bool); void restore_create_file_setting (); - void zoom_in (bool); - void zoom_out (bool); - void zoom_normal (bool); - private: void construct (void); @@ -229,10 +220,6 @@ QAction *_context_help_action; QAction *_context_doc_action; - QAction *_zoom_in_action; - QAction *_zoom_out_action; - QAction *_zoom_normal_action; - QAction *_find_action; QAction *_goto_line_action; diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.cc Thu Feb 13 22:17:44 2014 +0100 @@ -29,16 +29,13 @@ #ifdef HAVE_QSCINTILLA #include -#include #include "octave-qscintilla.h" #include "file-editor-tab.h" octave_qscintilla::octave_qscintilla (QWidget *p) : QsciScintilla (p) -{ - installEventFilter (this); -} +{ } octave_qscintilla::~octave_qscintilla () { } @@ -189,13 +186,4 @@ emit execute_command_in_terminal_signal (commands.at (i)); } -bool -octave_qscintilla::eventFilter(QObject *obj, QEvent *e) - { - if (e->type() == QEvent::ShortcutOverride) - return true; - else - return QObject::eventFilter(obj, e); - } - #endif diff -r f01ac1bb8a5d -r f959c63934e6 libgui/src/m-editor/octave-qscintilla.h --- a/libgui/src/m-editor/octave-qscintilla.h Thu Feb 13 20:39:09 2014 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.h Thu Feb 13 22:17:44 2014 +0100 @@ -62,7 +62,6 @@ private: QString _word_at_cursor; - bool eventFilter(QObject *obj, QEvent *e); };