Mercurial > octave-nkf
comparison libgui/src/m-editor/file-editor-tab.cc @ 16452:744ff2fe11ce
add create script context menu to history window
* history-dockwidget.h (history_doc_widget::command_create_script):
New signal.
* history-dockwidget.cc, history-dockwidget.h
(history_dock_widget::ctxMenu): New menu item, Create script.
(history_dock_widget::handle_contextmenu_create_script): New function.
* file-editor-interface.h (file-editor-interface::request_new_file):
New argument, commands.
* file-editor-tab.h, file-editor-tab.cc (file_editor_tab::new_file):
New argument, commands.
* m-editor/file-editor.h, m-editor/file-editor.cc
(file_editor::new_file, file_editor::request_new_file):
New argument, commands.
* main-window.h, main-window.cc (main_window::new_file):
New argument, commands.
main_window::construct): Connect history_window::command_create_script
signal to main_window::new_file.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sat, 06 Apr 2013 23:58:58 -0400 |
parents | 7a2ee6ea7800 |
children | 086b5e81245b |
comparison
equal
deleted
inserted
replaced
16451:d4c3736e1e28 | 16452:744ff2fe11ce |
---|---|
792 | 792 |
793 return QString (); | 793 return QString (); |
794 } | 794 } |
795 | 795 |
796 void | 796 void |
797 file_editor_tab::new_file () | 797 file_editor_tab::new_file (const QString &commands) |
798 { | 798 { |
799 update_window_title (false); // window title (no modification) | 799 update_window_title (false); // window title (no modification) |
800 _edit_area->setText (""); | 800 _edit_area->setText (commands); |
801 _edit_area->setModified (false); // new file is not modified yet | 801 _edit_area->setModified (false); // new file is not modified yet |
802 } | 802 } |
803 | 803 |
804 void | 804 void |
805 file_editor_tab::save_file (const QString& saveFileName, bool remove_on_success) | 805 file_editor_tab::save_file (const QString& saveFileName, bool remove_on_success) |