Hi
I found a bug in the zenity package, function zenity_file_selection.
It ignores the first field of the function that defines the title of
the window. I looked into the function file and noticed that the
variable that should hold this string is erased at the start. I
believe I fixed it and I am attaching the patch.
Also, I've noticed another possible bug in this function. If there's
only one file selected, the output is a string, if not, is a cell
array. That's ok because when I write the code, I define if I want
just 'single' or 'multiple'. However, if I choose 'mutiple', the user
still has the possibility to pick only one file, making the output a
string instead of a cell array. Is this behavior desirable or should I
change it to always place the output in a cell array if 'multiple' is
on, even if there's only one file?
My sourceforge username is carandraug.
Carnë Draug
Index: main/zenity/inst/zenity_file_selection.m
===================================================================
--- main/zenity/inst/zenity_file_selection.m (revision 7126)
+++ main/zenity/inst/zenity_file_selection.m (working copy)
@@ -36,8 +36,10 @@
function files = zenity_file_selection(title, varargin)
- save = multiple = directory = filename = title = "";
- if (nargin == 0 || isempty(title)), title = "Select a file"; endif
+ save = multiple = directory = filename = "";
+ if (nargin == 0 || isempty(title))
+ title = "Select a file";
+ endif
for i = 1:length(varargin)
option = varargin{i};
isc = ischar(option);
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev