diff scripts/gui/uigetfile.m @ 18971:f084aab05cd9

Move checks for graphics_toolkit GUI functions to own script. * __get_funcname__.m: New function to buid the function name from basename and graphics_toolkit. * uigetdir.m, uigetfile.m, uiputfile.m: Adapt to use __get_funcname__ with basename = mfilename ()
author Andreas Weber <andy.weber.aw@gmail.com>
date Thu, 31 Jul 2014 00:03:56 +0200
parents bb2a03f9ed20
children
line wrap: on
line diff
--- a/scripts/gui/uigetfile.m	Wed Jul 30 23:34:14 2014 +0200
+++ b/scripts/gui/uigetfile.m	Thu Jul 31 00:03:56 2014 +0200
@@ -66,15 +66,8 @@
 
 function [retfile, retpath, retindex] = uigetfile (varargin)
 
-  if (! __octave_link_enabled__ ())
-    tk = graphics_toolkit ();
-    funcname = ["__uigetfile_", tk, "__"];
-    if (numel (tk) > 0 && ! __is_function__ (funcname))
-      warning ("uigetfile: no implementation for toolkit '%s', using 'fltk' instead", tk);
-    endif
-    funcname = "__uigetfile_fltk__";
-  endif
-  
+  funcname = __get_funcname__ (mfilename ());
+
   if (nargin > 7)
     error ("uigetfile: number of input arguments must be less than eight");
   endif