Mercurial > octave-dspies
diff scripts/gui/uigetfile.m @ 18970:bb2a03f9ed20
Fix uigetdir, uigetfile, uiputfile. Remove check for nonexistent return value
* uigetfile.m: Don't check for existence of fltk script files. They are
always distributed, even when built without FLTK. This function
failed after moving the helper functions to ./private.
* uigetdir.m, uiputfile: same as uigetfile.m
* __is_function__.m: Remove comparison with impossible exist return value.
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Wed, 30 Jul 2014 23:34:14 +0200 |
parents | d63878346099 |
children | f084aab05cd9 |
line wrap: on
line diff
--- a/scripts/gui/uigetfile.m Tue Jul 29 21:13:03 2014 +0200 +++ b/scripts/gui/uigetfile.m Wed Jul 30 23:34:14 2014 +0200 @@ -67,18 +67,12 @@ function [retfile, retpath, retindex] = uigetfile (varargin) if (! __octave_link_enabled__ ()) - defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__"); - funcname = ["__uigetfile_", defaulttoolkit, "__"]; - functype = exist (funcname); - if (! __is_function__ (funcname)) - funcname = "__uigetfile_fltk__"; - if (! __is_function__ (funcname)) - error ("uigetfile: fltk graphics toolkit required"); - elseif (! strcmp (defaulttoolkit, "gnuplot")) - warning ("uigetfile: no implementation for toolkit '%s', using 'fltk' instead", - defaulttoolkit); - endif + 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 if (nargin > 7)