Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 18842:99e26cb0f87f gui-release
use the actions from the editor for the context menu
* octave-qscintilla.cc (contextMenuEvent): emit new signal for adding the
actions from the editor to the edit areas context menu
* octave-qscintilla.h: new signal
* file-editor-tab.cc (create_context_menu): new slot for the new signal from
the edit area,
(constructor): connect the edit areas signal for creating the context menu
to this new slot
* file-edit-tab.h: new slot and new signal for the editor dock widget
* file-editor.cc (create_context_menu): new slot for the new signal from
the edit tab adding the actions from the editor menu to the context menu,
(add_new_edit_tab): connect the edit tabs signal for creating the context
menu to this new slot
* file-editor.h: new slot
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 27 Apr 2014 18:35:19 +0200 |
parents | 74ef7fed8b9a |
children | f6f1f27026bb |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -89,6 +89,9 @@ this, SLOT (handle_cursor_moved (int,int))); + connect (_edit_area, SIGNAL (create_context_menu_signal (QMenu*)), + this, SLOT (create_context_menu (QMenu*))); + // create statusbar for row/col indicator _status_bar = new QStatusBar (this); @@ -1613,6 +1616,12 @@ } void +file_editor_tab::create_context_menu (QMenu *menu) +{ + emit create_context_menu_tab_signal (menu); +} + +void file_editor_tab::edit_area_has_focus (bool focus) { emit set_global_edit_shortcuts_signal (! focus);