comparison libgui/src/m-editor/file-editor-tab.h @ 18801:095fdef3d67c gui-release

use editors run selection action for the context menu * file-editor-tab.cc (constructor): initialize flag for octave file; (update_lexer): set flag for octave file; (set_file_name, handle_copy_available, change_editor_state): editor_state_changed signal uses flag for octave file; * file-editor-tab.h: flag for octave file, also used in editor_state_changed * file-editor.cc (create_context_menu): add action for running selection; (handle_editor_state_changed): gets flag whether file is an octave script, enable run action and run selection action depending on selection and file type; (add_file_editor_tab): connect editor_state_changed to handle_editor_state_changedwith new third parameter; * file-editor.h: handle_editor_state_changed has a new third parameter * octave-qscintilla.cc (contextMenuEvent): run selection is added by the edtior
author Torsten <ttl@justmail.de>
date Fri, 16 May 2014 20:01:27 +0200
parents fac35875f6eb
children 6504a1932637
comparison
equal deleted inserted replaced
18794:be569698970c 18801:095fdef3d67c
121 void create_context_menu (QMenu *); 121 void create_context_menu (QMenu *);
122 122
123 signals: 123 signals:
124 124
125 void file_name_changed (const QString& fileName, const QString& toolTip); 125 void file_name_changed (const QString& fileName, const QString& toolTip);
126 void editor_state_changed (bool copy_available, const QString& fileName); 126 void editor_state_changed (bool copy_available, const QString& fileName,
127 bool is_octave_file);
127 void tab_remove_request (); 128 void tab_remove_request ();
128 void add_filename_to_list (const QString&, QWidget *); 129 void add_filename_to_list (const QString&, QWidget *);
129 void mru_add_file (const QString& file_name); 130 void mru_add_file (const QString& file_name);
130 void editor_check_conflict_save (const QString& saveFileName, 131 void editor_check_conflict_save (const QString& saveFileName,
131 bool remove_on_success); 132 bool remove_on_success);
215 QString _file_name_short; 216 QString _file_name_short;
216 217
217 bool _long_title; 218 bool _long_title;
218 bool _copy_available; 219 bool _copy_available;
219 bool _app_closing; 220 bool _app_closing;
221 bool _is_octave_file;
220 222
221 QFileSystemWatcher _file_system_watcher; 223 QFileSystemWatcher _file_system_watcher;
222 224
223 find_dialog *_find_dialog; 225 find_dialog *_find_dialog;
224 bool _find_dialog_is_visible; 226 bool _find_dialog_is_visible;