diff scripts/plot/graphics_toolkit.m @ 14021:e3bed294b117

refactor graphics_toolkit class (bug #31583) * graphics_toolkit.m: Call loaded_graphics_toolkits to check whether the given toolkit was correctly loaded. * graphics.cc (gnuplot_toolkit): Move to separate file. * __init_gnuplot__.cc: New file, split from graphics.cc. * DLD-FUNCTIONS/module-files: Include __init_gnuplot__.cc in the list. * graphics.h.in, graphics.cc (gtk_manager): New class, extracted from graphics_toolkit, to manage the available and loaded graphics_toolkits. Change all uses of moved functions. * __init_fltk__.cc: Add PKG_ADD line to register toolkit. (toolkit_loaded): Rename from toolkit_registered. * graphics.cc (Fregister_graphics_toolkit, Floaded_graphics_toolkits): New functions.
author John W. Eaton <jwe@octave.org>
date Fri, 09 Dec 2011 11:12:50 -0500
parents 08ae07e40d4f
children c3fab3891460
line wrap: on
line diff
--- a/scripts/plot/graphics_toolkit.m
+++ b/scripts/plot/graphics_toolkit.m
@@ -52,10 +52,10 @@
     endif
   endif
 
-  if (! any (strcmp (available_graphics_toolkits (), name)))
+  if (! any (strcmp (loaded_graphics_toolkits (), name)))
     feval (["__init_", name, "__"]);
-    if (! any (strcmp (available_graphics_toolkits (), name)))
-      error ("graphics_toolkit: %s toolkit was not correctly registered", name);
+    if (! any (strcmp (loaded_graphics_toolkits (), name)))
+      error ("graphics_toolkit: %s toolkit was not correctly loaded", name);
     endif
   endif