diff libgui/src/m-editor/file-editor.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 38ed6bdd1f7f
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Sat Apr 06 23:43:23 2013 -0400
+++ b/libgui/src/m-editor/file-editor.cc	Sat Apr 06 23:58:58 2013 -0400
@@ -112,7 +112,7 @@
 }
 
 void
-file_editor::request_new_file ()
+file_editor::request_new_file (const QString& commands)
 {
   // New file isn't a file_editor_tab function since the file
   // editor tab has yet to be created and there is no object to
@@ -122,7 +122,7 @@
   if (fileEditorTab)
     {
       add_file_editor_tab (fileEditorTab, "");  // new tab with empty title
-      fileEditorTab->new_file ();               // title is updated here
+      fileEditorTab->new_file (commands);       // title is updated here
       set_focus ();                             // focus editor and new tab
     }
 }