diff options
author | Pierre MARECHAL <pierre.marechal@scilab.org> | 2010-05-12 15:11:22 +0200 |
---|---|---|
committer | Clément DAVID <clement.david@scilab.org> | 2010-05-18 15:51:03 +0200 |
commit | 51fdbcfbcd17d4b7b0ef0fb03dd2847b849945e6 (patch) | |
tree | 284838f84fc5c5a3d0d4675c0ddb47615650b1a0 /scilab/modules | |
parent | ddaeea478eb06e4e7132aa1886b900e400787152 (diff) | |
download | scilab-51fdbcfbcd17d4b7b0ef0fb03dd2847b849945e6.zip scilab-51fdbcfbcd17d4b7b0ef0fb03dd2847b849945e6.tar.gz |
* ATOMS GUI: When a module is not up-to-date, a warning is displayed on the
corresponding sheet.
* bug 6842 fixed - If the installed version of a module was not the most recent
one, the ATOMS GUI claimed that the newest version was
installed.
Change-Id: Ib5174d5509abad45c2ac80ce534a5a1769a02e46
Diffstat (limited to 'scilab/modules')
-rw-r--r-- | scilab/modules/atoms/Makefile.am | 4 | ||||
-rw-r--r-- | scilab/modules/atoms/Makefile.in | 4 | ||||
-rwxr-xr-x | scilab/modules/atoms/images/icons/notuptodate.png | bin | 0 -> 1181 bytes | |||
-rw-r--r-- | scilab/modules/atoms/images/icons/software-update-available.png | bin | 0 -> 740 bytes | |||
-rw-r--r-- | scilab/modules/atoms/locales/en_US/atoms.pot | 79 | ||||
-rw-r--r-- | scilab/modules/atoms/locales/fr_FR/atoms.po | 6 | ||||
-rw-r--r-- | scilab/modules/atoms/macros/atoms_gui/atomsGui.sci | 67 | ||||
-rw-r--r-- | scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci | 55 | ||||
-rw-r--r-- | scilab/modules/atoms/tests/nonreg_tests/bug_6842.tst | 32 |
9 files changed, 189 insertions, 58 deletions
diff --git a/scilab/modules/atoms/Makefile.am b/scilab/modules/atoms/Makefile.am index 270a852..7ca7a06 100644 --- a/scilab/modules/atoms/Makefile.am +++ b/scilab/modules/atoms/Makefile.am | |||
@@ -23,6 +23,8 @@ MACROSDIRSEXT = macros/atoms_internals macros/atoms_gui | |||
23 | #### atoms : icons files #### | 23 | #### atoms : icons files #### |
24 | libsciatoms_la_iconsdir=$(mydatadir)/ | 24 | libsciatoms_la_iconsdir=$(mydatadir)/ |
25 | nobase_libsciatoms_la_icons_DATA = images/icons/installed.png \ | 25 | nobase_libsciatoms_la_icons_DATA = images/icons/installed.png \ |
26 | images/icons/notinstalled.png | 26 | images/icons/notinstalled.png \ |
27 | images/icons/notuptodate.png \ | ||
28 | images/icons/software-update-available.png | ||
27 | 29 | ||
28 | include $(top_srcdir)/Makefile.incl.am | 30 | include $(top_srcdir)/Makefile.incl.am |
diff --git a/scilab/modules/atoms/Makefile.in b/scilab/modules/atoms/Makefile.in index 6714ebc..4359d01 100644 --- a/scilab/modules/atoms/Makefile.in +++ b/scilab/modules/atoms/Makefile.in | |||
@@ -369,7 +369,9 @@ MACROSDIRSEXT = macros/atoms_internals macros/atoms_gui | |||
369 | #### atoms : icons files #### | 369 | #### atoms : icons files #### |
370 | libsciatoms_la_iconsdir = $(mydatadir)/ | 370 | libsciatoms_la_iconsdir = $(mydatadir)/ |
371 | nobase_libsciatoms_la_icons_DATA = images/icons/installed.png \ | 371 | nobase_libsciatoms_la_icons_DATA = images/icons/installed.png \ |
372 | images/icons/notinstalled.png | 372 | images/icons/notinstalled.png \ |
373 | images/icons/notuptodate.png \ | ||
374 | images/icons/software-update-available.png | ||
373 | 375 | ||
374 | 376 | ||
375 | # Where all the Scilab stuff is installed (macros, help, ...) | 377 | # Where all the Scilab stuff is installed (macros, help, ...) |
diff --git a/scilab/modules/atoms/images/icons/notuptodate.png b/scilab/modules/atoms/images/icons/notuptodate.png new file mode 100755 index 0000000..7c40430 --- /dev/null +++ b/scilab/modules/atoms/images/icons/notuptodate.png | |||
Binary files differ | |||
diff --git a/scilab/modules/atoms/images/icons/software-update-available.png b/scilab/modules/atoms/images/icons/software-update-available.png new file mode 100644 index 0000000..ab8d494 --- /dev/null +++ b/scilab/modules/atoms/images/icons/software-update-available.png | |||
Binary files differ | |||
diff --git a/scilab/modules/atoms/locales/en_US/atoms.pot b/scilab/modules/atoms/locales/en_US/atoms.pot index a2e0b39..5730af5 100644 --- a/scilab/modules/atoms/locales/en_US/atoms.pot +++ b/scilab/modules/atoms/locales/en_US/atoms.pot | |||
@@ -14,7 +14,7 @@ msgstr "" | |||
14 | "MIME-Version: 1.0\n" | 14 | "MIME-Version: 1.0\n" |
15 | "Content-Type: text/plain; charset=ISO-8859-1\n" | 15 | "Content-Type: text/plain; charset=ISO-8859-1\n" |
16 | "Content-Transfer-Encoding: 8bit\n" | 16 | "Content-Transfer-Encoding: 8bit\n" |
17 | "Revision-Date: 2010-05-18 15:11+0100\n" | 17 | "Revision-Date: 2010-05-18 15:22+0100\n" |
18 | 18 | ||
19 | # File: macros/atomsAutoloadAdd.sci, line: 168 | 19 | # File: macros/atomsAutoloadAdd.sci, line: 168 |
20 | # File: macros/atomsAutoloadAdd.sci, line: 173 | 20 | # File: macros/atomsAutoloadAdd.sci, line: 173 |
@@ -751,7 +751,7 @@ msgstr "" | |||
751 | msgid "%s: Wrong value for input argument #%d: ''%s'' is not a valid URL.\n" | 751 | msgid "%s: Wrong value for input argument #%d: ''%s'' is not a valid URL.\n" |
752 | msgstr "" | 752 | msgstr "" |
753 | # | 753 | # |
754 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 135 | 754 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 134 |
755 | #, c-format | 755 | #, c-format |
756 | msgid "%s: Wrong value for input argument #%d: ''%s'' or ''%s'' expected.\n" | 756 | msgid "%s: Wrong value for input argument #%d: ''%s'' or ''%s'' expected.\n" |
757 | msgstr "" | 757 | msgstr "" |
@@ -974,47 +974,52 @@ msgstr "" | |||
974 | msgid "%s: the package ''%s'' doesn''t exist.\n" | 974 | msgid "%s: the package ''%s'' doesn''t exist.\n" |
975 | msgstr "" | 975 | msgstr "" |
976 | # | 976 | # |
977 | # File: macros/atoms_gui/atomsGui.sci, line: 69 | 977 | # File: macros/atoms_gui/atomsGui.sci, line: 73 |
978 | msgid "&?" | 978 | msgid "&?" |
979 | msgstr "" | 979 | msgstr "" |
980 | # | 980 | # |
981 | # File: macros/atoms_gui/atomsGui.sci, line: 68 | 981 | # File: macros/atoms_gui/atomsGui.sci, line: 72 |
982 | msgid "&Edit" | 982 | msgid "&Edit" |
983 | msgstr "" | 983 | msgstr "" |
984 | # | 984 | # |
985 | # File: macros/atoms_gui/atomsGui.sci, line: 66 | 985 | # File: macros/atoms_gui/atomsGui.sci, line: 70 |
986 | msgid "&File" | 986 | msgid "&File" |
987 | msgstr "" | 987 | msgstr "" |
988 | # | 988 | # |
989 | # File: macros/atoms_gui/atomsGui.sci, line: 67 | 989 | # File: macros/atoms_gui/atomsGui.sci, line: 71 |
990 | msgid "&Tools" | 990 | msgid "&Tools" |
991 | msgstr "" | 991 | msgstr "" |
992 | # | 992 | # |
993 | # File: macros/atoms_gui/atomsGui.sci, line: 97 | 993 | # File: macros/atoms_gui/atomsGui.sci, line: 101 |
994 | msgid "?" | 994 | msgid "?" |
995 | msgstr "" | 995 | msgstr "" |
996 | # | 996 | # |
997 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 62 | 997 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 290 |
998 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 72 | 998 | #, c-format |
999 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 82 | 999 | msgid "A new version (''%s'') of ''%s'' is available" |
1000 | # File: macros/atoms_gui/atomsGui.sci, line: 57 | 1000 | msgstr "" |
1001 | # | ||
1002 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 61 | ||
1003 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 71 | ||
1004 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 81 | ||
1005 | # File: macros/atoms_gui/atomsGui.sci, line: 61 | ||
1001 | msgid "Atoms" | 1006 | msgid "Atoms" |
1002 | msgstr "" | 1007 | msgstr "" |
1003 | # | 1008 | # |
1004 | # File: macros/atoms_gui/atomsGui.sci, line: 102 | 1009 | # File: macros/atoms_gui/atomsGui.sci, line: 106 |
1005 | msgid "Atoms Help..." | 1010 | msgid "Atoms Help..." |
1006 | msgstr "" | 1011 | msgstr "" |
1007 | # | 1012 | # |
1008 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 60 | 1013 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 59 |
1009 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 70 | 1014 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 69 |
1010 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 80 | 1015 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 79 |
1011 | # File: macros/atoms_gui/atomsGui.sci, line: 23 | 1016 | # File: macros/atoms_gui/atomsGui.sci, line: 23 |
1012 | # File: macros/atoms_gui/atomsGui.sci, line: 25 | 1017 | # File: macros/atoms_gui/atomsGui.sci, line: 25 |
1013 | msgid "Atoms error" | 1018 | msgid "Atoms error" |
1014 | msgstr "" | 1019 | msgstr "" |
1015 | # | 1020 | # |
1016 | # File: macros/atomsShow.sci, line: 85 | 1021 | # File: macros/atomsShow.sci, line: 85 |
1017 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 222 | 1022 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 234 |
1018 | msgid "Author(s)" | 1023 | msgid "Author(s)" |
1019 | msgstr "" | 1024 | msgstr "" |
1020 | # | 1025 | # |
@@ -1022,7 +1027,7 @@ msgstr "" | |||
1022 | msgid "Automatically Installed" | 1027 | msgid "Automatically Installed" |
1023 | msgstr "" | 1028 | msgstr "" |
1024 | # | 1029 | # |
1025 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 320 | 1030 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 329 |
1026 | msgid "Bytes" | 1031 | msgid "Bytes" |
1027 | msgstr "" | 1032 | msgstr "" |
1028 | # | 1033 | # |
@@ -1030,7 +1035,7 @@ msgstr "" | |||
1030 | msgid "Category(ies)" | 1035 | msgid "Category(ies)" |
1031 | msgstr "" | 1036 | msgstr "" |
1032 | # | 1037 | # |
1033 | # File: macros/atoms_gui/atomsGui.sci, line: 90 | 1038 | # File: macros/atoms_gui/atomsGui.sci, line: 94 |
1034 | msgid "Close" | 1039 | msgid "Close" |
1035 | msgstr "" | 1040 | msgstr "" |
1036 | # | 1041 | # |
@@ -1039,11 +1044,11 @@ msgid "Depend" | |||
1039 | msgstr "" | 1044 | msgstr "" |
1040 | # | 1045 | # |
1041 | # File: macros/atomsShow.sci, line: 99 | 1046 | # File: macros/atomsShow.sci, line: 99 |
1042 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 244 | 1047 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 256 |
1043 | msgid "Description" | 1048 | msgid "Description" |
1044 | msgstr "" | 1049 | msgstr "" |
1045 | # | 1050 | # |
1046 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 207 | 1051 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 219 |
1047 | msgid "Download size" | 1052 | msgid "Download size" |
1048 | msgstr "" | 1053 | msgstr "" |
1049 | # | 1054 | # |
@@ -1051,15 +1056,15 @@ msgstr "" | |||
1051 | msgid "Entity" | 1056 | msgid "Entity" |
1052 | msgstr "" | 1057 | msgstr "" |
1053 | # | 1058 | # |
1054 | # File: macros/atoms_gui/atomsGui.sci, line: 78 | 1059 | # File: macros/atoms_gui/atomsGui.sci, line: 82 |
1055 | msgid "File" | 1060 | msgid "File" |
1056 | msgstr "" | 1061 | msgstr "" |
1057 | # | 1062 | # |
1058 | # File: macros/atoms_gui/atomsGui.sci, line: 83 | 1063 | # File: macros/atoms_gui/atomsGui.sci, line: 87 |
1059 | msgid "Home" | 1064 | msgid "Home" |
1060 | msgstr "" | 1065 | msgstr "" |
1061 | # | 1066 | # |
1062 | # File: macros/atoms_gui/atomsGui.sci, line: 288 | 1067 | # File: macros/atoms_gui/atomsGui.sci, line: 315 |
1063 | msgid "Install" | 1068 | msgid "Install" |
1064 | msgstr "" | 1069 | msgstr "" |
1065 | # | 1070 | # |
@@ -1067,15 +1072,15 @@ msgstr "" | |||
1067 | msgid "Install Directory" | 1072 | msgid "Install Directory" |
1068 | msgstr "" | 1073 | msgstr "" |
1069 | # | 1074 | # |
1070 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 62 | 1075 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 61 |
1071 | msgid "Installation done! Please restart Scilab to take changes into account." | 1076 | msgid "Installation done! Please restart Scilab to take changes into account." |
1072 | msgstr "" | 1077 | msgstr "" |
1073 | # | 1078 | # |
1074 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 60 | 1079 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 59 |
1075 | msgid "Installation failed!" | 1080 | msgid "Installation failed!" |
1076 | msgstr "" | 1081 | msgstr "" |
1077 | # | 1082 | # |
1078 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 323 | 1083 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 332 |
1079 | msgid "KB" | 1084 | msgid "KB" |
1080 | msgstr "" | 1085 | msgstr "" |
1081 | # | 1086 | # |
@@ -1083,12 +1088,12 @@ msgstr "" | |||
1083 | msgid "License" | 1088 | msgid "License" |
1084 | msgstr "" | 1089 | msgstr "" |
1085 | # | 1090 | # |
1086 | # File: macros/atoms_gui/atomsGui.sci, line: 251 | 1091 | # File: macros/atoms_gui/atomsGui.sci, line: 278 |
1087 | # File: macros/atoms_gui/atomsGui.sci, line: 325 | 1092 | # File: macros/atoms_gui/atomsGui.sci, line: 352 |
1088 | msgid "List of installed modules" | 1093 | msgid "List of installed modules" |
1089 | msgstr "" | 1094 | msgstr "" |
1090 | # | 1095 | # |
1091 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 326 | 1096 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 335 |
1092 | msgid "MB" | 1097 | msgid "MB" |
1093 | msgstr "" | 1098 | msgstr "" |
1094 | # | 1099 | # |
@@ -1096,7 +1101,7 @@ msgstr "" | |||
1096 | msgid "Maintainer(s)" | 1101 | msgid "Maintainer(s)" |
1097 | msgstr "" | 1102 | msgstr "" |
1098 | # | 1103 | # |
1099 | # File: macros/atoms_gui/atomsGui.sci, line: 206 | 1104 | # File: macros/atoms_gui/atomsGui.sci, line: 233 |
1100 | msgid "Modules" | 1105 | msgid "Modules" |
1101 | msgstr "" | 1106 | msgstr "" |
1102 | # | 1107 | # |
@@ -1112,15 +1117,15 @@ msgstr "" | |||
1112 | msgid "Package" | 1117 | msgid "Package" |
1113 | msgstr "" | 1118 | msgstr "" |
1114 | # | 1119 | # |
1115 | # File: macros/atoms_gui/atomsGui.sci, line: 278 | 1120 | # File: macros/atoms_gui/atomsGui.sci, line: 305 |
1116 | msgid "Remove" | 1121 | msgid "Remove" |
1117 | msgstr "" | 1122 | msgstr "" |
1118 | # | 1123 | # |
1119 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 72 | 1124 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 71 |
1120 | msgid "Remove done! Please restart Scilab to take changes into account. " | 1125 | msgid "Remove done! Please restart Scilab to take changes into account. " |
1121 | msgstr "" | 1126 | msgstr "" |
1122 | # | 1127 | # |
1123 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 70 | 1128 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 69 |
1124 | msgid "Remove failed!" | 1129 | msgid "Remove failed!" |
1125 | msgstr "" | 1130 | msgstr "" |
1126 | # | 1131 | # |
@@ -1140,20 +1145,20 @@ msgstr "" | |||
1140 | msgid "Title" | 1145 | msgid "Title" |
1141 | msgstr "" | 1146 | msgstr "" |
1142 | # | 1147 | # |
1143 | # File: macros/atoms_gui/atomsGui.sci, line: 298 | 1148 | # File: macros/atoms_gui/atomsGui.sci, line: 325 |
1144 | msgid "Update" | 1149 | msgid "Update" |
1145 | msgstr "" | 1150 | msgstr "" |
1146 | # | 1151 | # |
1147 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 82 | 1152 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 81 |
1148 | msgid "Update done! Please restart Scilab to take changes into account." | 1153 | msgid "Update done! Please restart Scilab to take changes into account." |
1149 | msgstr "" | 1154 | msgstr "" |
1150 | # | 1155 | # |
1151 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 80 | 1156 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 79 |
1152 | msgid "Update failed!" | 1157 | msgid "Update failed!" |
1153 | msgstr "" | 1158 | msgstr "" |
1154 | # | 1159 | # |
1155 | # File: macros/atomsShow.sci, line: 82 | 1160 | # File: macros/atomsShow.sci, line: 82 |
1156 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 239 | 1161 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 251 |
1157 | msgid "Version" | 1162 | msgid "Version" |
1158 | msgstr "" | 1163 | msgstr "" |
1159 | # | 1164 | # |
diff --git a/scilab/modules/atoms/locales/fr_FR/atoms.po b/scilab/modules/atoms/locales/fr_FR/atoms.po index 3aa2883..51a5138 100644 --- a/scilab/modules/atoms/locales/fr_FR/atoms.po +++ b/scilab/modules/atoms/locales/fr_FR/atoms.po | |||
@@ -634,6 +634,12 @@ msgstr "&Outils" | |||
634 | msgid "?" | 634 | msgid "?" |
635 | msgstr "?" | 635 | msgstr "?" |
636 | 636 | ||
637 | # | ||
638 | # File: macros/atoms_gui/cbAtomsGui.sci, line: 290 | ||
639 | #, c-format | ||
640 | msgid "A new version (''%s'') of ''%s'' is available" | ||
641 | msgstr "" | ||
642 | |||
637 | msgid "Atoms" | 643 | msgid "Atoms" |
638 | msgstr "Atoms" | 644 | msgstr "Atoms" |
639 | 645 | ||
diff --git a/scilab/modules/atoms/macros/atoms_gui/atomsGui.sci b/scilab/modules/atoms/macros/atoms_gui/atomsGui.sci index 7a3be5c..1e0ec60 100644 --- a/scilab/modules/atoms/macros/atoms_gui/atomsGui.sci +++ b/scilab/modules/atoms/macros/atoms_gui/atomsGui.sci | |||
@@ -38,6 +38,10 @@ function atomsGui() | |||
38 | margin = 10; | 38 | margin = 10; |
39 | widgetHeight = 25; | 39 | widgetHeight = 25; |
40 | 40 | ||
41 | // Message Frame | ||
42 | msgWidth = figwidth -2*margin; | ||
43 | msgHeight = 30; | ||
44 | |||
41 | // Button | 45 | // Button |
42 | buttonHeight = 20; | 46 | buttonHeight = 20; |
43 | 47 | ||
@@ -115,8 +119,19 @@ function atomsGui() | |||
115 | vers = getfield(1, allModules(modulesNames(k))); | 119 | vers = getfield(1, allModules(modulesNames(k))); |
116 | vers = vers(3); | 120 | vers = vers(3); |
117 | 121 | ||
118 | if atomsIsInstalled([modulesNames(k) vers]) then | 122 | if atomsIsInstalled(modulesNames(k)) then |
119 | icon = "installed.png"; | 123 | |
124 | MRVersionAvailable = atomsGetMRVersion(modulesNames(k)); | ||
125 | MRVersionInstalled = atomsVersionSort(atomsGetInstalledVers(modulesNames(k)),"DESC"); | ||
126 | MRVersionInstalled = MRVersionInstalled(1); | ||
127 | if atomsVersionCompare(MRVersionInstalled,MRVersionAvailable) == -1 then | ||
128 | // Not up-to-date | ||
129 | icon = "notuptodate.png"; | ||
130 | else | ||
131 | // The Most Recent Version is already installed | ||
132 | icon = "installed.png"; | ||
133 | end | ||
134 | |||
120 | else | 135 | else |
121 | icon = "notinstalled.png"; | 136 | icon = "notinstalled.png"; |
122 | end | 137 | end |
@@ -151,6 +166,17 @@ function atomsGui() | |||
151 | 166 | ||
152 | for k=1:size(installed(:,1), "*") | 167 | for k=1:size(installed(:,1), "*") |
153 | 168 | ||
169 | MRVersionAvailable = atomsGetMRVersion(installed(k,1)); | ||
170 | MRVersionInstalled = atomsVersionSort(atomsGetInstalledVers(installed(k,1)),"DESC"); | ||
171 | MRVersionInstalled = MRVersionInstalled(1); | ||
172 | if atomsVersionCompare(MRVersionInstalled,MRVersionAvailable) == -1 then | ||
173 | // Not up-to-date | ||
174 | icon = "notuptodate.png"; | ||
175 | else | ||
176 | // The Most Recent Version is already installed | ||
177 | icon = "installed.png"; | ||
178 | end | ||
179 | |||
154 | if modulo(k,2) == 0 then | 180 | if modulo(k,2) == 0 then |
155 | background = "#eeeeee"; | 181 | background = "#eeeeee"; |
156 | else | 182 | else |
@@ -158,8 +184,9 @@ function atomsGui() | |||
158 | end | 184 | end |
159 | 185 | ||
160 | thisItem = "<html>"; | 186 | thisItem = "<html>"; |
187 | |||
161 | thisItem = thisItem + "<table style=""background-color:"+background+";color:#000000;"" ><tr>"; | 188 | thisItem = thisItem + "<table style=""background-color:"+background+";color:#000000;"" ><tr>"; |
162 | thisItem = thisItem + "<td><img src=""file:///"+SCI+"/modules/atoms/images/icons/installed.png"" /></td>"; | 189 | thisItem = thisItem + "<td><img src=""file:///"+SCI+"/modules/atoms/images/icons/"+icon+""" /></td>"; |
163 | thisItem = thisItem + "<td>"; | 190 | thisItem = thisItem + "<td>"; |
164 | thisItem = thisItem + " <div style=""width:385px;text-align:left;"">"; | 191 | thisItem = thisItem + " <div style=""width:385px;text-align:left;"">"; |
165 | thisItem = thisItem + " <span style=""font-weight:bold;"">"+allModules(installed(k,1))(installed(k,2)).Title+" "+installed(k,2)+"</span><br />"; | 192 | thisItem = thisItem + " <span style=""font-weight:bold;"">"+allModules(installed(k,1))(installed(k,2)).Title+" "+installed(k,2)+"</span><br />"; |
@@ -184,7 +211,7 @@ function atomsGui() | |||
184 | listboxWidth = 200; | 211 | listboxWidth = 200; |
185 | listboxFrameWidth = listboxWidth + 2*margin; | 212 | listboxFrameWidth = listboxWidth + 2*margin; |
186 | 213 | ||
187 | listboxFrameHeight = figheight- 2*margin; | 214 | listboxFrameHeight = figheight- 3*margin - msgHeight; |
188 | listboxHeight = listboxFrameHeight - 3*margin; | 215 | listboxHeight = listboxFrameHeight - 3*margin; |
189 | 216 | ||
190 | // Frame | 217 | // Frame |
@@ -192,7 +219,7 @@ function atomsGui() | |||
192 | "Parent" , atomsfig,.. | 219 | "Parent" , atomsfig,.. |
193 | "Style" , "frame",.. | 220 | "Style" , "frame",.. |
194 | "Relief" , "solid",.. | 221 | "Relief" , "solid",.. |
195 | "Position" , [margin margin listboxFrameWidth listboxFrameHeight],.. | 222 | "Position" , [margin widgetHeight+2*margin listboxFrameWidth listboxFrameHeight],.. |
196 | "Background" , [1 1 1],.. | 223 | "Background" , [1 1 1],.. |
197 | "Tag" , "LeftFrame"); | 224 | "Tag" , "LeftFrame"); |
198 | 225 | ||
@@ -237,7 +264,7 @@ function atomsGui() | |||
237 | "Style" , "frame",.. | 264 | "Style" , "frame",.. |
238 | "Relief" , "solid",.. | 265 | "Relief" , "solid",.. |
239 | "Background" , [1 1 1],.. | 266 | "Background" , [1 1 1],.. |
240 | "Position" , [listboxFrameWidth+2*margin margin descFrameWidth descFrameHeight],.. | 267 | "Position" , [listboxFrameWidth+2*margin widgetHeight+2*margin descFrameWidth descFrameHeight],.. |
241 | "Tag" , "DescFrame", .. | 268 | "Tag" , "DescFrame", .. |
242 | "Visible" , "off"); | 269 | "Visible" , "off"); |
243 | 270 | ||
@@ -301,7 +328,7 @@ function atomsGui() | |||
301 | "Tag" , "updateButton"); | 328 | "Tag" , "updateButton"); |
302 | 329 | ||
303 | // Home: List of installed modules | 330 | // Home: List of installed modules |
304 | // ============================================================================= | 331 | // ========================================================================= |
305 | 332 | ||
306 | descWidth = descFrameWidth - 2*margin; | 333 | descWidth = descFrameWidth - 2*margin; |
307 | descHeight = descFrameHeight - 3*margin; | 334 | descHeight = descFrameHeight - 3*margin; |
@@ -312,7 +339,7 @@ function atomsGui() | |||
312 | "Style" , "frame",.. | 339 | "Style" , "frame",.. |
313 | "Relief" , "solid",.. | 340 | "Relief" , "solid",.. |
314 | "Background" , [1 1 1],.. | 341 | "Background" , [1 1 1],.. |
315 | "Position" , [listboxFrameWidth+2*margin margin descFrameWidth descFrameHeight],.. | 342 | "Position" , [listboxFrameWidth+2*margin widgetHeight+2*margin descFrameWidth descFrameHeight],.. |
316 | "Tag" , "HomeFrame"); | 343 | "Tag" , "HomeFrame"); |
317 | 344 | ||
318 | // Frame title | 345 | // Frame title |
@@ -341,4 +368,28 @@ function atomsGui() | |||
341 | "Max" , 1, .. | 368 | "Max" , 1, .. |
342 | "Tag" , "HomeListbox"); | 369 | "Tag" , "HomeListbox"); |
343 | 370 | ||
371 | // Message Frame | ||
372 | // ========================================================================= | ||
373 | |||
374 | // Frame | ||
375 | msgFrame = uicontrol( .. | ||
376 | "Parent" , atomsfig,.. | ||
377 | "Style" , "frame",.. | ||
378 | "Relief" , "solid",.. | ||
379 | "Background" , [1 1 1],.. | ||
380 | "Position" , [margin margin msgWidth msgHeight],.. | ||
381 | "Tag" , "msgFrame"); | ||
382 | |||
383 | // Text | ||
384 | msgText = uicontrol( .. | ||
385 | "Parent" , msgFrame,... | ||
386 | "Style" , "text",.. | ||
387 | "HorizontalAlignment", "left",.. | ||
388 | "VerticalAlignment" , "middle",.. | ||
389 | "String" , "", .. | ||
390 | "FontSize" , 12,.. | ||
391 | "Background" , [1 1 1],.. | ||
392 | "Position" , [2 2 msgWidth-10 msgHeight-4],.. | ||
393 | "Tag" , "msgText"); | ||
394 | |||
344 | endfunction | 395 | endfunction |
diff --git a/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci b/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci index a260bdf..322ff6ae 100644 --- a/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci +++ b/scilab/modules/atoms/macros/atoms_gui/cbAtomsGui.sci | |||
@@ -22,7 +22,6 @@ function cbAtomsGui() | |||
22 | // Get the description frame object | 22 | // Get the description frame object |
23 | DescFrame = findobj("tag","DescFrame"); | 23 | DescFrame = findobj("tag","DescFrame"); |
24 | 24 | ||
25 | |||
26 | // Display selected module informations | 25 | // Display selected module informations |
27 | // ========================================================================= | 26 | // ========================================================================= |
28 | 27 | ||
@@ -189,14 +188,27 @@ function updateDescFrame() | |||
189 | allModules = get(thisFigure,"userdata"); | 188 | allModules = get(thisFigure,"userdata"); |
190 | thisModuleName = get(DescFrame ,"userdata"); | 189 | thisModuleName = get(DescFrame ,"userdata"); |
191 | 190 | ||
191 | // Reset the message frame | ||
192 | // ========================================================================= | ||
193 | set(findobj("tag","msgText"),"String",""); | ||
194 | |||
192 | // Get the module details | 195 | // Get the module details |
193 | // ========================================================================= | 196 | // ========================================================================= |
194 | 197 | ||
195 | modulesNames = getfield(1, allModules); | 198 | modulesNames = getfield(1, allModules); |
196 | modulesNames (1:2) = []; | 199 | modulesNames (1:2) = []; |
197 | thisModuleStruct = allModules(thisModuleName); | 200 | thisModuleStruct = allModules(thisModuleName); |
198 | thisModuleVersions = getfield(1,thisModuleStruct); | 201 | |
199 | thisModuleDetails = thisModuleStruct(thisModuleVersions(3)); | 202 | MRVersionAvailable = atomsGetMRVersion(thisModuleName); |
203 | MRVersionInstalled = ""; | ||
204 | |||
205 | if atomsIsInstalled(thisModuleName) then | ||
206 | MRVersionInstalled = atomsVersionSort(atomsGetInstalledVers(thisModuleName),"DESC"); | ||
207 | MRVersionInstalled = MRVersionInstalled(1); | ||
208 | thisModuleDetails = thisModuleStruct(MRVersionInstalled); | ||
209 | else | ||
210 | thisModuleDetails = thisModuleStruct(MRVersionAvailable); | ||
211 | end | ||
200 | 212 | ||
201 | // Manage size | 213 | // Manage size |
202 | // ========================================================================= | 214 | // ========================================================================= |
@@ -270,15 +282,12 @@ function updateDescFrame() | |||
270 | // Tests for update available | 282 | // Tests for update available |
271 | // -------------------------- | 283 | // -------------------------- |
272 | 284 | ||
273 | moduleVersion = atomsGetMRVersion(thisModuleName); | 285 | canUpdate = "off"; |
274 | installedVersions = atomsGetInstalledVers(thisModuleName); | ||
275 | canUpdate = "off"; | ||
276 | 286 | ||
277 | for k=1:size(installedVersions,"*") | 287 | if atomsIsInstalled(thisModuleName) & atomsVersionCompare(MRVersionInstalled,MRVersionAvailable) == -1 then |
278 | if atomsVersionCompare(installedVersions(k), moduleVersion)==-1 then | 288 | // Not up-to-date |
279 | canUpdate = "on"; | 289 | canUpdate = "on"; |
280 | break | 290 | showWarning(sprintf(gettext("A new version (''%s'') of ''%s'' is available"),MRVersionAvailable,thisModuleDetails.Title)); |
281 | end | ||
282 | end | 291 | end |
283 | 292 | ||
284 | // Can be removed | 293 | // Can be removed |
@@ -355,6 +364,9 @@ endfunction | |||
355 | 364 | ||
356 | function showHome() | 365 | function showHome() |
357 | 366 | ||
367 | // Reset the message frame | ||
368 | set(findobj("tag","msgText"),"String",""); | ||
369 | |||
358 | // Hide the Desc frame | 370 | // Hide the Desc frame |
359 | hide("DescFrame"); | 371 | hide("DescFrame"); |
360 | hide("DescTitle"); | 372 | hide("DescTitle"); |
@@ -392,3 +404,24 @@ function showDesc() | |||
392 | show("updateButton"); | 404 | show("updateButton"); |
393 | 405 | ||
394 | endfunction | 406 | endfunction |
407 | |||
408 | |||
409 | // ============================================================================= | ||
410 | // showWarning | ||
411 | // + Update the string in the msg Frame | ||
412 | // ============================================================================= | ||
413 | |||
414 | function showWarning(msg) | ||
415 | |||
416 | str = "<html>"; | ||
417 | str = str + "<table><tr>"; | ||
418 | str = str + "<td><img src=""file:///"+SCI+"/modules/atoms/images/icons/software-update-available.png"" /></td>"; | ||
419 | str = str + "<td><div style=""color:red;font-style:italic;"">"+msg+"</div></td>"; | ||
420 | str = str + "</tr></table>"; | ||
421 | str = str + "</html>"; | ||
422 | |||
423 | msgText = findobj("tag","msgText"); | ||
424 | |||
425 | set(msgText,"String",str); | ||
426 | |||
427 | endfunction | ||
diff --git a/scilab/modules/atoms/tests/nonreg_tests/bug_6842.tst b/scilab/modules/atoms/tests/nonreg_tests/bug_6842.tst new file mode 100644 index 0000000..4a373f9 --- /dev/null +++ b/scilab/modules/atoms/tests/nonreg_tests/bug_6842.tst | |||
@@ -0,0 +1,32 @@ | |||
1 | // ============================================================================= | ||
2 | // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab | ||
3 | // Copyright (C) 2010 - DIGITEO - Pierre MARECHAL | ||
4 | // | ||
5 | // This file is distributed under the same license as the Scilab package. | ||
6 | // ============================================================================= | ||
7 | |||
8 | // <-- TEST WITH ATOMS --> | ||
9 | // <-- INTERACTIVE TEST --> | ||
10 | // | ||
11 | // <-- Non-regression test for bug 6842 --> | ||
12 | // | ||
13 | // <-- Bugzilla URL --> | ||
14 | // http://bugzilla.scilab.org/show_bug.cgi?id=6842 | ||
15 | // | ||
16 | // <-- Short Description --> | ||
17 | // When an ATOMS module has several versions and that, e.g. the oldest is | ||
18 | // installed by using atomsInstall on Scilab's command line, atomsGUI claims | ||
19 | // that the newest version is installed. | ||
20 | |||
21 | load("SCI/modules/atoms/macros/atoms_internals/lib"); | ||
22 | |||
23 | atomsRepositorySetOfl("http://scene11.test.atoms.scilab.org"); | ||
24 | atomsSystemUpdate(); | ||
25 | atomsInstall(["toolbox_4","1.0-1"]); | ||
26 | if ~atomsIsInstalled("toolbox_4") then pause, end | ||
27 | atomsGui(); | ||
28 | |||
29 | // Check if there is a warning when the description of toolbox_1 is displayed. | ||
30 | |||
31 | atomsRemove("toolbox_1"); | ||
32 | atomsRepositorySetOfl("http://atoms.scilab.org"); | ||