# HG changeset patch # User Torsten # Date 1421949744 -3600 # Node ID 3156773fcc809f49cc12dafbb8cf3f463f5e282a # Parent d258070914ef17a455fba7450ad7c7d584ee90a3 open a doc page from editor directly without command window * file-editor.cc (add_file_editor_tab): connect new signal from edit area requesting showing the documentation * octave-qscintilla.cc (contextmenu_help_doc): emit new signal for documentation * octave-qscintilla.h: new signal for documentation diff -r d258070914ef -r 3156773fcc80 libgui/src/m-editor/file-editor.cc --- a/libgui/src/m-editor/file-editor.cc Thu Jan 22 06:52:37 2015 +0100 +++ b/libgui/src/m-editor/file-editor.cc Thu Jan 22 19:02:24 2015 +0100 @@ -1586,6 +1586,9 @@ connect (f->qsci_edit_area (), SIGNAL (status_update (bool, bool)), this, SLOT (edit_status_update (bool, bool))); + connect (f->qsci_edit_area (), SIGNAL (show_doc_signal (const QString&)), + main_win (), SLOT (handle_show_doc (const QString&))); + // Signals from the file editor_tab connect (f, SIGNAL (file_name_changed (const QString&, const QString&)), this, SLOT (handle_file_name_changed (const QString&, diff -r d258070914ef -r 3156773fcc80 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Thu Jan 22 06:52:37 2015 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.cc Thu Jan 22 19:02:24 2015 +0100 @@ -255,12 +255,10 @@ void octave_qscintilla::contextmenu_help_doc (bool documentation) { - QString command; if (documentation) - command = "doc "; + emit show_doc_signal (_word_at_cursor); else - command = "help "; - emit execute_command_in_terminal_signal (command + _word_at_cursor); + emit execute_command_in_terminal_signal ("help " + _word_at_cursor); } void diff -r d258070914ef -r 3156773fcc80 libgui/src/m-editor/octave-qscintilla.h --- a/libgui/src/m-editor/octave-qscintilla.h Thu Jan 22 06:52:37 2015 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.h Thu Jan 22 19:02:24 2015 +0100 @@ -54,6 +54,7 @@ void context_menu_edit_signal (const QString&); void qsci_has_focus_signal (bool); void status_update (bool,bool); + void show_doc_signal (const QString&); private slots: