# HG changeset patch # User John W. Eaton # Date 1380218143 14400 # Node ID 55680de6a8976d167c9bb8a0a967e82468cabeae # Parent b66f068e4468216a52f12029e86fbd3cb098045b make fltk the default graphics toolkit * graphics.h.in (figure::properties): Use gtk_manager::default_toolkit to set initial value. * graphics.cc (gtk_manager::gtk_manager): Move here from graphics.h.in. Set dtk to "fltk" if HAVE_FLTK, otherwise set it to "gnuplot". diff -r b66f068e4468 -r 55680de6a897 NEWS --- a/NEWS Thu Sep 26 09:38:51 2013 -0700 +++ b/NEWS Thu Sep 26 13:55:43 2013 -0400 @@ -17,6 +17,16 @@ Summary of important user-visible changes for version 3.8: --------------------------------------------------------- + ** Octave now uses OpenGL graphics by default with FLTK widgets. If + OpenGL libraries or FLTK widgets are not available when Octave is + built, gnuplot is used. You may also choose to use gnuplot for + graphics by executing the command + + graphics_toolkit ("gnuplot") + + Adding this command to your ~/.octaverc file will set the default + for each session. + ** Octave now supports nested functions with scoping rules that are compatible with Matlab. A nested function is one declared and defined within the body of another function. The nested function is only diff -r b66f068e4468 -r 55680de6a897 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Thu Sep 26 09:38:51 2013 -0700 +++ b/libinterp/corefcn/graphics.cc Thu Sep 26 13:55:43 2013 -0400 @@ -9501,6 +9501,16 @@ gtk_manager *gtk_manager::instance = 0; +gtk_manager::gtk_manager (void) + : dtk (), available_toolkits (), loaded_toolkits () +{ +#if defined (HAVE_FLTK) + dtk = "fltk"; +#else + dtk = "gnuplot"; +#endif +} + void gtk_manager::create_instance (void) { diff -r b66f068e4468 -r 55680de6a897 libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Thu Sep 26 09:38:51 2013 -0700 +++ b/libinterp/corefcn/graphics.in.h Thu Sep 26 13:55:43 2013 -0400 @@ -2361,10 +2361,7 @@ private: - // FIXME: default toolkit should be configurable. - - gtk_manager (void) - : dtk ("gnuplot"), available_toolkits (), loaded_toolkits () { } + gtk_manager (void); ~gtk_manager (void) { } @@ -3458,7 +3455,7 @@ radio_property xvisualmode , "{auto}|manual" // Octave-specific properties bool_property __enhanced__ h , "on" - string_property __graphics_toolkit__ s , "gnuplot" + string_property __graphics_toolkit__ s , gtk_manager::default_toolkit () any_property __guidata__ h , Matrix () any_property __plot_stream__ h , Matrix () END_PROPERTIES