* Bug #8151 fixed - Under Mac OS X, item "Scilab/Quit Scilab" and "File/Quit" were
duplicates.
+* Bug #11509 fixed - A progression bar was missing during Atoms operations.
+
* Bug #11592 fixed - In the documentation, example of bessel failed.
* Bug #11597 fixed - On Mac OS X, the Preferences windows was not accessible
--- /dev/null
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012-2012 - Scilab Enterprises - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+//
+//
+function atomsCloseProgressBar(winId)
+ if (getscilabmode() <> "NWNI")
+ winclose(winId);
+ end
+endfunction
file_in));
end
+ winId = atomsOpenProgressBar(_("Updating Atoms modules database..."), %t)
for i=1:(size(lines_in,"*")+1)
+ atomsUpdateProgressBar(winId, i / size(lines_in,"*"));
// File totally read : register the latest toolbox
if i == (size(lines_in,"*")+1) then
// Register the current toolbox : Check the mandatory fields
missingfield = atomsCheckFields( current_toolbox );
if ~ isempty(missingfield) then
+ atomsCloseProgressBar(winId);
error(msprintf(gettext("%s: The file ""%s"" is not well formated, the toolbox ""%s - %s"" doesn''t contain the %s field\n"), ..
"atomsDESCRIPTIONread",..
file_in,current_toolbox("Toolbox"),..
// Register the current toolbox : Check the mandatory fields
missingfield = atomsCheckFields( current_toolbox );
if ~ isempty(missingfield) then
+ atomsCloseProgressBar(winId);
error(msprintf(gettext("%s: The file ""%s"" is not well formated, the toolbox ""%s - %s"" doesn''t contain the %s field\n"), ..
"atomsDESCRIPTIONread",..
file_in,current_toolbox("Toolbox"),..
if and(isfield(current_toolbox,["Toolbox";"Version"])) then
categories_flat = atomsAddPackage2Cat( categories_flat , [current_toolbox("Toolbox") current_toolbox("Version")],current_value);
else
+ atomsCloseProgressBar(winId);
error(msprintf(gettext("%s: name and version are not both defined\n"),"atomsDESCRIPTIONread"));
end
end
// Second case : Current field continuation
if regexp(lines_in(i),"/^\s/","o") == 1 then
current_value = part(lines_in(i),2:length(lines_in(i)));
- current_toolbox(current_field) = [ current_toolbox(current_field) ; current_value ];
+ current_toolbox(current_field)($+1) = current_value;
// Category management
if current_field == "Category" then
if and(isfield(current_toolbox,["Toolbox";"Version"])) then
categories_flat = atomsAddPackage2Cat( categories_flat , [current_toolbox("Toolbox") current_toolbox("Version")],current_value);
else
+ atomsCloseProgressBar(winId);
error(msprintf(gettext("%s: name and version are not both defined\n"),"atomsDESCRIPTIONread"));
end
end
end
// Else Error
+ atomsCloseProgressBar(winId);
error(msprintf(gettext("%s: The file ''%s'' is not well formated at line %d\n"),"atomsDESCRIPTIONread",file_in,i));
end
description_out("packages") = packages;
description_out("categories") = categories;
description_out("categories_flat") = categories_flat;
+ atomsCloseProgressBar(winId);
endfunction
download_cmd = proxy_host_arg+"wget"+proxy_user_arg+timeout_arg+" "+url_in + " -O " + file_out;
end
+ winId = atomsOpenProgressBar(_("Download in progress... Please be patient."), %f);
+
err = [];
[rep,stat,err] = unix_g(download_cmd);
mprintf(gettext("\t - URL : ''%s''\n"), url_in);
mprintf(gettext("\t - Local location : ''%s''\n"), file_out);
if isdef('err') then
+ atomsCloseProgressBar(winId);
error(strcat(err, ascii(10)));
end
end
mprintf(gettext("%s: The following file hasn''t been copied:\n"),"atomsDownload");
mprintf(gettext("\t - source : ''%s''\n"),file_in);
mprintf(gettext("\t - destination : ''%s''\n"),file_out);
+ atomsCloseProgressBar(winId);
error(strcat(lasterror(), ascii(10)));
end
mprintf(gettext("\t - file : ''%s''\n"),file_out);
mprintf(gettext("\t - MD5SUM expected : ''%s''\n"),md5sum);
mprintf(gettext("\t - MD5SUM watched : ''%s''\n"),filemd5);
+ atomsCloseProgressBar(winId);
error("");
end
end
+ atomsCloseProgressBar(winId);
endfunction
--- /dev/null
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012-2012 - Scilab Enterprises - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+//
+//
+
+function winId = atomsOpenProgressBar(message, withValue)
+ if (getscilabmode() <> "NWNI")
+ if (withValue == %t)
+ winId = waitbar(_("Atoms:")+" "+message);
+ else
+ winId = progressionbar(_("Atoms:")+" "+message);
+ end
+ else
+ winId = -1
+ end
+endfunction
\ No newline at end of file
--- /dev/null
+//
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012-2012 - Scilab Enterprises - Bruno JOFRET
+//
+// This file must be used under the terms of the CeCILL.
+// This source file is licensed as described in the file COPYING, which
+// you should have received as part of this distribution. The terms
+// are also available at
+// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+//
+//
+
+function atomsUpdateProgressBar(winId, value)
+ if (getscilabmode() <> "NWNI" & winId.type == "Waitbar")
+ waitbar(value, winId);
+ end
+endfunction
\ No newline at end of file
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2008 - INRIA - Vincent Couvert
- *
+ *
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
- * are also available at
+ * are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
private static final long serialVersionUID = -5208590743368628657L;
- private static final int WIDTH = 300;
+ private static final int WIDTH = 400;
private static final int HEIGHT = 150;
private String uid;
setIconImage(scilabIcon.getImage());
GridBagLayout gridbag = new GridBagLayout();
-
+
Insets insets = new Insets(8, 4, 8, 4);
-
+
JPanel pane = new JPanel(gridbag);
pane.setOpaque(true);
setContentPane(pane);
-
+
/* Scilab icon */
GridBagConstraints iconConstraints = new GridBagConstraints();
pane.setVisible(true);
pane.doLayout();
-
+
this.setSize(WIDTH, HEIGHT);
this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
this.setMinimumSize(new Dimension(WIDTH, HEIGHT));
-
+
if (ScilabConsole.isExistingConsole()) {
setLocationRelativeTo((Component) ScilabConsole.getConsole().getAsSimpleConsole());
}
-
+
this.setVisible(true);
this.doLayout();
this.pack();