Mercurial > hg > octave-terminal
changeset 11583:c4c2cd67c440
Fixes for ui file functions, bug#32190
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Thu, 20 Jan 2011 20:31:30 +0100 |
parents | 21dec063e89f |
children | cda4aa780d58 |
files | scripts/ChangeLog scripts/plot/uigetdir.m scripts/plot/uigetfile.m scripts/plot/uiputfile.m src/ChangeLog src/DLD-FUNCTIONS/__init_fltk__.cc |
diffstat | 6 files changed, 23 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,10 @@ +2010-01-20 Petr Mikulik <mikulik@physics.muni.cz> + + * plot/uigetdir.m: Use correct variable name for argument check. + Remove unneeded white spaces. + * plot/uigetfile.m, plot/uiputfile.m: Remove unneeded white spaces. + Bug #32190. + 2011-01-20 John W. Eaton <jwe@octave.org> * plot/ginput.m, plot/gnuplot_drawnow.m, plot/uiputfile.m,
--- a/scripts/plot/uigetdir.m +++ b/scripts/plot/uigetdir.m @@ -33,11 +33,10 @@ print_usage (); endif - if (!ischar(init_path) || !ischar(name)) + if (!ischar(init_path) || !ischar(dialog_name)) error ("uigetdir: INIT_PATH and DIALOG_NAME must be string arguments"); endif - if (any (strcmp (available_graphics_toolkits (), "fltk"))) if (!isdir (init_path)) init_path = fileparts (init_path); @@ -49,6 +48,5 @@ endfunction - -%!demo +%!demo %! uigetdir(pwd, "Select Directory")
--- a/scripts/plot/uigetfile.m +++ b/scripts/plot/uigetfile.m @@ -43,7 +43,7 @@ ## in the second column. ## Example: @code{uigetfile (@{"*.ext", "My Description";"*.xyz", ## "XYZ-Format"@})} -## +## ## The filter string can also contain a semicolon separated list of filter ## extensions. ## Example: @code{uigetfile (@{"*.gif;*.png;*.jpg", "Supported Picture @@ -57,7 +57,7 @@ ## The screen position of the GUI dialog can be set using the "Position" key ## and a 2-element vector containing the pixel coordinates. ## Two or more files can be selected when setting the "Multiselect" key to "on". -## In that case @var{fname} is a cell array containing the files. +## In that case @var{fname} is a cell array containing the files. ## @end deftypefn ## Author: Kai Habel @@ -129,7 +129,7 @@ for i = stridx : 2 : nargin prop = varargin{i}; val = varargin{i + 1}; - if (strncmp (tolower (prop), "position", 8)) + if (strncmp (tolower (prop), "position", 8)) if (ismatrix (val) && length(val) == 2) outargs{4} = val; else @@ -151,12 +151,11 @@ endif if (any (cellfun(@(x)strcmp (x, "fltk"), available_graphics_toolkits ()))) - [retfile, retpath, retindex] = __fltk_uigetfile__ (outargs{:}); + [retfile, retpath, retindex] = __fltk_uigetfile__ (outargs{:}); else error ("uigetfile: fltk graphics toolkit required."); endif - endfunction %!demo
--- a/scripts/plot/uiputfile.m +++ b/scripts/plot/uiputfile.m @@ -55,7 +55,6 @@ function [retfile, retpath, retindex] = uiputfile (varargin) - if (nargin <= 3) defaultvals = {"All Files(*)", #FLTK File Filter @@ -76,7 +75,7 @@ outargs{3} = file_filter; endif endif - + if (nargin > 1) outargs{2} = varargin{2}; endif @@ -90,12 +89,12 @@ endif if (any (cellfun(@(x)strcmp (x, "fltk"), available_graphics_toolkits ()))) - [retfile, retpath, retindex] = __fltk_uigetfile__ (outargs{:}); + [retfile, retpath, retindex] = __fltk_uigetfile__ (outargs{:}); else error ("uiputfile: fltk graphics toolkit required"); endif endfunction -%!demo +%!demo %! uiputfile({"*.gif;*.png;*.jpg", "Supported Picture Formats"})
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-01-20 Kai Habel <kai.habel@gmx.de> + + * DLD-FUNCTIONS/__init_fltk__.cc (__fltk_uigetfile__): Append file + seperator to 2nd return value (file path). + Bug #32190. + 2011-01-20 John W. Eaton <jwe@octave.org> * oct-obj.h (octave_value_list::octave_value_list): Initialize