summaryrefslogtreecommitdiffstats
path: root/scilab
diff options
context:
space:
mode:
authorSamuel GOUGEON <sgougeon@free.fr>2021-04-22 20:17:13 +0200
committerClément David <clement.david@esi-group.com>2021-04-29 17:05:50 +0200
commitd93530298568019a940e22291608fcd919c9488e (patch)
treef10432ca5f88cee38a382268a35c0ef4717efd57 /scilab
parentea43ac558e60c0e032b218b3b2db59e1ebcb0174 (diff)
downloadscilab-d93530298568019a940e22291608fcd919c9488e.zip
scilab-d93530298568019a940e22291608fcd919c9488e.tar.gz
* Bug 16677 fixed: offline, atomsInstall() was flashing the console
http://bugzilla.scilab.org/16677 // Interactive test: om = atomsGetConfig("offline"); atomsSetConfig offline True atomsInstall(WSCI+"\modules\atoms\tests\unit_tests\toolbox_7V6_1.0-1.bin.zip", "user"); // The installation must succeed without flashing the console atomsRemove toolbox_7V6 atomsSetConfig("offline", om); Change-Id: I68e68673bc1919790062aa5fed345ca86698760d
Diffstat (limited to 'scilab')
-rw-r--r--scilab/CHANGES.md1
-rw-r--r--scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci8
-rw-r--r--scilab/modules/atoms/macros/atoms_internals/atomsUpdateProgressBar.sci4
3 files changed, 10 insertions, 3 deletions
diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md
index 0b9480d..c20922b 100644
--- a/scilab/CHANGES.md
+++ b/scilab/CHANGES.md
@@ -465,6 +465,7 @@ Bug Fixes
465* [#16654](https://bugzilla.scilab.org/16654): `interp` was leaking memory. 465* [#16654](https://bugzilla.scilab.org/16654): `interp` was leaking memory.
466* [#16661](https://bugzilla.scilab.org/16661): `x=spzeros(1e10,1e10)` yielded an incorrect error message. 466* [#16661](https://bugzilla.scilab.org/16661): `x=spzeros(1e10,1e10)` yielded an incorrect error message.
467* [#16665](https://bugzilla.scilab.org/16665): `help echo` could not redirect to `help mode` when preferred, for new users coming from Octave. 467* [#16665](https://bugzilla.scilab.org/16665): `help echo` could not redirect to `help mode` when preferred, for new users coming from Octave.
468* [#16677](https://bugzilla.scilab.org/16677): In offline mode, `atomsInstall` was flashing many times the console.
468* [#16679](https://bugzilla.scilab.org/16679): `get_function_path("acosh")` yielded an error (regression from Scilab 6.0.0). 469* [#16679](https://bugzilla.scilab.org/16679): `get_function_path("acosh")` yielded an error (regression from Scilab 6.0.0).
469 470
470 471
diff --git a/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci b/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci
index 08ee4a5..c03a185 100644
--- a/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci
+++ b/scilab/modules/atoms/macros/atoms_internals/atomsDESCRIPTIONread.sci
@@ -116,7 +116,13 @@ function description_out = atomsDESCRIPTIONread(file_in,additional)
116 file_in)); 116 file_in));
117 end 117 end
118 118
119 winId = atomsOpenProgressBar(_("Updating Atoms modules database..."), %t) 119 if size(lines_in,1)>1000 then
120 winId = atomsOpenProgressBar(_("Updating Atoms modules database..."), %t)
121 else
122 // No progression bar required when the DESCRIPTION file is so short that
123 // its processing will be very fast:
124 winId = []
125 end
120 for i=1:(size(lines_in,"*")+1) 126 for i=1:(size(lines_in,"*")+1)
121 127
122 atomsUpdateProgressBar(winId, i / size(lines_in,"*")); 128 atomsUpdateProgressBar(winId, i / size(lines_in,"*"));
diff --git a/scilab/modules/atoms/macros/atoms_internals/atomsUpdateProgressBar.sci b/scilab/modules/atoms/macros/atoms_internals/atomsUpdateProgressBar.sci
index d6a08dc..33bd81b 100644
--- a/scilab/modules/atoms/macros/atoms_internals/atomsUpdateProgressBar.sci
+++ b/scilab/modules/atoms/macros/atoms_internals/atomsUpdateProgressBar.sci
@@ -14,7 +14,7 @@
14// 14//
15 15
16function atomsUpdateProgressBar(winId, value) 16function atomsUpdateProgressBar(winId, value)
17 if (getscilabmode() <> "NWNI" & winId.type == "Waitbar") 17 if (getscilabmode() <> "NWNI" & winId <> [] & winId.type == "Waitbar")
18 waitbar(value, winId); 18 waitbar(value, winId);
19 end 19 end
20endfunction \ No newline at end of file 20endfunction