Mercurial > octave-dspies
comparison scripts/gui/uigetdir.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 |
---|---|
28 | 28 |
29 ## Author: Kai Habel | 29 ## Author: Kai Habel |
30 | 30 |
31 function dirname = uigetdir (init_path = pwd, dialog_name = "Select Directory to Open") | 31 function dirname = uigetdir (init_path = pwd, dialog_name = "Select Directory to Open") |
32 | 32 |
33 if (! __octave_link_enabled__ ()) | 33 funcname = __get_funcname__ (mfilename ()); |
34 tk = graphics_toolkit (); | |
35 funcname = ["uigetdir", tk, "__"]; | |
36 if (numel (tk) > 0 && ! __is_function__ (funcname)) | |
37 warning ("uigetdir: no implementation for toolkit '%s', using 'fltk' instead", tk); | |
38 endif | |
39 funcname = "__uigetdir_fltk__"; | |
40 endif | |
41 | 34 |
42 if (nargin > 2) | 35 if (nargin > 2) |
43 print_usage (); | 36 print_usage (); |
44 endif | 37 endif |
45 | 38 |