### Bugs fixed in 6.0.1:
* [#4276](http://bugzilla.scilab.org/show_bug.cgi?id=4276): `strsubst` replaced the first occurence in regex mode.
* [#5278](http://bugzilla.scilab.org/show_bug.cgi?id=5278): obsolete `xset()` was still used in scripts, macros, tests and help pages.
-<<<<<<< HEAD
* [#8297](http://bugzilla.scilab.org/show_bug.cgi?id=8297): `cat` slowness was exponential, crippling, and made it useless.
* [#9519](http://bugzilla.scilab.org/show_bug.cgi?id=9519): The console menu `File -> Open a file` opened any file in Scinotes. Binary files like .zcos blocked Scinotes.
* [#11756](http://bugzilla.scilab.org/show_bug.cgi?id=11756): In the categories of the ATOMS GUI, actually available modules might be not listed.
* [#12195](http://bugzilla.scilab.org/show_bug.cgi?id=12195): `generateBlockImage` sometimes changed the current graphic driver.
-* [#12771](http://bugzilla.scilab.org/show_bug.cgi?id=12771): xcosPalGenerateAllIcons help example was broken.
-=======
* [#12372](http://bugzilla.scilab.org/show_bug.cgi?id=12372): The `mode` function was poorly documented.
-* [#12771](http://bugzilla.scilab.org/show_bug.cgi?id=12771): xcosPalGenerateAllIcons help example was broken
->>>>>>> e8fcc0dce30... * Bug 12330: mode() was poorly documented. Page overhauled
+* [#12771](http://bugzilla.scilab.org/show_bug.cgi?id=12771): xcosPalGenerateAllIcons help example was broken.
* [#13592](http://bugzilla.scilab.org/show_bug.cgi?id=13592): In an axes in a uicontrol frame, setting a `legend` interactively might not follow the mouse accurately.
* [#13900](http://bugzilla.scilab.org/show_bug.cgi?id=13900): `nanmin` and `nanmax` were useless duplicates of `min` and `max`
* [#14254](http://bugzilla.scilab.org/show_bug.cgi?id=14254): When installing an ATOMS module that is not locally registered and available, the error message was unclear.
* [#15070](http://bugzilla.scilab.org/show_bug.cgi?id=15070): `bitset` failed when the bit position is an encoded integer.
* [#15072](http://bugzilla.scilab.org/show_bug.cgi?id=15072): The context was stored as a root diagram attribute instead of being stored on each Superblock layer.
* [#15079](http://bugzilla.scilab.org/show_bug.cgi?id=15079): When all children of a graphic handle have not the same number of sub-children, any vectorized extraction or insertion in subchildren failed.
+* [#15089](http://bugzilla.scilab.org/show_bug.cgi?id=15089): The `getcolor` GUI cleared and used the current figure.
* [#15107](http://bugzilla.scilab.org/show_bug.cgi?id=15107): failed to build with ocaml 4.04.0.
* [#15117](http://bugzilla.scilab.org/show_bug.cgi?id=15117): Imbricated optim/leastsq/lsqrsolve/fsolve calls either crashed or returned errors
* [#15119](http://bugzilla.scilab.org/show_bug.cgi?id=15119): Inequality comparisons between complex-encoded real numbers failed.
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA
+// Copyright (C) 2017 - Samuel GOUGEON
+//
// Copyright (C) 2012 - 2016 - Scilab Enterprises
//
// This file is hereby licensed under the terms of the GNU GPL v2.0,
cini = 1;
elseif rhs==1 then
if type(Title)~=10 then
- error(msprintf(gettext("%s: Wrong type for input argument #%d: string expected.\n"), "getcolor", 1));
+ msg = gettext("%s: Wrong type for input argument #%d: string expected.\n")
+ error(msprintf(msg, "getcolor", 1));
end
if size(Title, "*")~=1 then
- error(msprintf(gettext("%s: Wrong size for input argument #%d: string expected.\n"), "getcolor", 1));
+ msg = gettext("%s: Wrong size for input argument #%d: string expected.\n")
+ error(msprintf(msg, "getcolor", 1));
end
cini = 1;
elseif rhs==2 then
if type(Title)~=10 then
- error(msprintf(gettext("%s: Wrong type for input argument #%d: string expected.\n"), "getcolor", 1));
+ msg = gettext("%s: Wrong type for input argument #%d: string expected.\n")
+ error(msprintf(msg, "getcolor", 1));
end
if size(Title, "*")~=1 then
- error(msprintf(gettext("%s: Wrong size for input argument #%d: string expected.\n"), "getcolor", 1));
+ msg = gettext("%s: Wrong size for input argument #%d: string expected.\n")
+ error(msprintf(msg, "getcolor", 1));
end
if type(cini)~=1 then
- error(msprintf(gettext("%s: Wrong type for input argument #%d: A real expected.\n"), "getcolor", 2));
+ msg = gettext("%s: Wrong type for input argument #%d: A real expected.\n")
+ error(msprintf(msg, "getcolor", 2));
end
if size(cini, "*")~=1 then
- error(msprintf(gettext("%s: Wrong size for input argument #%d: A real expected.\n"), "getcolor", 2));
+ msg = gettext("%s: Wrong size for input argument #%d: A real expected.\n")
+ error(msprintf(msg, "getcolor", 2));
end
else
- error(msprintf(gettext("%s: Wrong number of input arguments: %d to %d expected.\n"), "getcolor", 2, 0, 2));
+ msg = gettext("%s: Wrong number of input arguments: %d to %d expected.\n")
+ error(msprintf(msg, "getcolor", 2, 0, 2));
end
if winsid()~=[] then
end;
// create the window for getcolor
-
- win = max(winsid());
- if isempty(win) then
- win = 1;
- end
-
- scf(win);
+ fig = scf();
+ fig.visible = "off";
+ win = fig.figure_id;
- sdf;
- sda;
- fig = gcf();
+ sdf; // quite agressive. Not sure it is actually useful
+ sda; // same remark
if cmap~=[] then
fig.color_map = cmap;
else
toolbar(win, "off")
- delmenu(win,gettext("&File"))
- delmenu(win,gettext("&Tools"))
- delmenu(win,gettext("&Edit"))
- delmenu(win,gettext("&?"))
+ delmenu(win, gettext("&File"))
+ delmenu(win, gettext("&Tools"))
+ delmenu(win, gettext("&Edit"))
+ delmenu(win, gettext("&?"))
dx = wdim(1)/m;
dy = wdim(2)/n;
addmenu(win, gettext("Ok"));
addmenu(win, gettext("Cancel"));
+ fig.visible = "on";
c_i = 0;
c = cini;
end;
k1 = k;
name = rgb2name(cmap(k,eye())*255);
- fig.info_message = ..
- gettext("Color number")+" "+string(k)+": R="+string(floor(cmap(k,1)*255))+" G="+string(floor(cmap(k,2)*255))+" B="+string(floor(cmap(k,3)*255))+" "+gettext("Name")+"="""+name(1)+"""";
-
-
- end;
- end;
+ txt = msprintf("RGB(%d)=[%d %d %d]",k,cmap(k,1:3)*255);
+ if name~=[]
+ txt = txt + " : """ + name(1) + """"
+ end
+ fig.info_message = txt
+ end
+ end
if (c_i <> windowCloseButton) then
delete(fig);