Mercurial > octave-dspies
comparison 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 |
comparison
equal
deleted
inserted
replaced
18970:bb2a03f9ed20 | 18971:f084aab05cd9 |
---|---|
64 | 64 |
65 ## Author: Kai Habel | 65 ## Author: Kai Habel |
66 | 66 |
67 function [retfile, retpath, retindex] = uigetfile (varargin) | 67 function [retfile, retpath, retindex] = uigetfile (varargin) |
68 | 68 |
69 if (! __octave_link_enabled__ ()) | 69 funcname = __get_funcname__ (mfilename ()); |
70 tk = graphics_toolkit (); | 70 |
71 funcname = ["__uigetfile_", tk, "__"]; | |
72 if (numel (tk) > 0 && ! __is_function__ (funcname)) | |
73 warning ("uigetfile: no implementation for toolkit '%s', using 'fltk' instead", tk); | |
74 endif | |
75 funcname = "__uigetfile_fltk__"; | |
76 endif | |
77 | |
78 if (nargin > 7) | 71 if (nargin > 7) |
79 error ("uigetfile: number of input arguments must be less than eight"); | 72 error ("uigetfile: number of input arguments must be less than eight"); |
80 endif | 73 endif |
81 | 74 |
82 defaultvals = {cell(0, 2), # File Filter | 75 defaultvals = {cell(0, 2), # File Filter |