diff libgui/src/main-window.cc @ 15420:1249a615c91b

call built-in functions directly in GUI callbacks * main-window.cc: Include builtins.h instead of debug.h and variables.h. (main_window::save_workspace_callback): Call Fsave directly. (main_window::load_workspace_callback): Call Fload directly. (main_window::clear_workspace_callback):Call Fclear directly. (main_window::change_directory_callback): Call Fcd, not octave_env::chdir. (main_window::debug_continue_callback): Call Fdbcont directly. (main_window::debug_step_into_callback): Call Fdbstep directly. (main_window::debug_step_over_callback): Call Fdbstep directly. (main_window::debug_step_out_callback): Call Fdbstep directly. (main_window::debug_quit_callback): Call Fdbquit directly. (main_window::exit_callback): Call Fquit directly. * oct-obj.h (ovl): New functions. * debug.cc, debug.h (debug_step, debug_quit, debug_continue): Delete. * load-save.cc, load-save.h (load_workspace, save_workspace): Delete. * variables.cc, varaibles.h (clear_current_scope): Delete.
author John W. Eaton <jwe@octave.org>
date Wed, 19 Sep 2012 14:38:47 -0400
parents f52a62a6db3a
children a42d69d5a36d
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Wed Sep 19 14:32:30 2012 -0400
+++ b/libgui/src/main-window.cc	Wed Sep 19 14:38:47 2012 -0400
@@ -42,11 +42,10 @@
 #include "octave-link.h"
 #include "settings-dialog.h"
 
-#include "debug.h"
+#include "builtins.h"
 #include "defaults.h"
 #include "load-save.h"
 #include "toplev.h"
-#include "variables.h"
 #include "version.h"
 
 #include "cmd-hist.h"
@@ -871,19 +870,19 @@
 void
 main_window::save_workspace_callback (const std::string& file)
 {
-  save_workspace (file);
+  Fsave (ovl (file));
 }
 
 void
 main_window::load_workspace_callback (const std::string& file)
 {
-  load_workspace (file);
+  Fload (ovl (file));
 }
 
 void
 main_window::clear_workspace_callback (void)
 {
-  clear_current_scope ();
+  Fclear ();
 }
 
 void
@@ -897,41 +896,41 @@
 void
 main_window::change_directory_callback (const std::string& directory)
 {
-  octave_env::chdir (directory); 
+  Fcd (ovl (directory));
 }
 
 void
 main_window::debug_continue_callback (void)
 {
-  debug_continue ();
+  Fdbcont ();
 }
 
 void
 main_window::debug_step_into_callback (void)
 {
-  debug_step ("in");
+  Fdbstep (ovl ("in"));
 }
 
 void
 main_window::debug_step_over_callback (void)
 {
-  debug_step ();
+  Fdbstep ();
 }
 
 void
 main_window::debug_step_out_callback (void)
 {
-  debug_step ("out");
+  Fdbstep (ovl ("out"));
 }
 
 void
 main_window::debug_quit_callback (void)
 {
-  debug_quit ();
+  Fdbquit ();
 }
 
 void
 main_window::exit_callback (void)
 {
-  clean_up_and_exit (0);
+  Fquit ();
 }