comparison scripts/gui/uiputfile.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
comparison
equal deleted inserted replaced
18970:bb2a03f9ed20 18971:f084aab05cd9
54 54
55 ## Author: Kai Habel 55 ## Author: Kai Habel
56 56
57 function [retfile, retpath, retindex] = uiputfile (varargin) 57 function [retfile, retpath, retindex] = uiputfile (varargin)
58 58
59 if (! __octave_link_enabled__ ()) 59 funcname = __get_funcname__ (mfilename ());
60 tk = graphics_toolkit ();
61 funcname = ["uiputfile", tk, "__"];
62 if (numel (tk) > 0 && ! __is_function__ (funcname))
63 warning ("uiputfile: no implementation for toolkit '%s', using 'fltk' instead", tk);
64 endif
65 funcname = "__uiputfile_fltk__";
66 endif
67 60
68 if (nargin > 3) 61 if (nargin > 3)
69 print_usage (); 62 print_usage ();
70 endif 63 endif
71 64