Changeset 8018 in josm
- Timestamp:
- 2015-02-09T09:39:45+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r8017 r8018 123 123 * @since 6797 124 124 */ 125 public void notifyDownloadResults(final Component parent, PluginDownloadTask task) {125 public static void notifyDownloadResults(final Component parent, PluginDownloadTask task, boolean restartRequired) { 126 126 final Collection<PluginInformation> downloaded = task.getDownloadedPlugins(); 127 127 final Collection<PluginInformation> failed = task.getFailedPlugins(); … … 129 129 sb.append("<html>"); 130 130 sb.append(buildDownloadSummary(task)); 131 boolean restartRequired = false;132 for (PluginInformation pi : downloaded) {133 if (!model.getNewlyActivatedPlugins().contains(pi) || !pi.canloadatruntime) {134 restartRequired = true;135 break;136 }137 }138 131 if (restartRequired) { 139 132 sb.append(tr("Please restart JOSM to activate the downloaded plugins.")); … … 428 421 if (pluginDownloadTask.isCanceled()) 429 422 return; 430 notifyDownloadResults(pnlPluginPreferences, pluginDownloadTask); 423 boolean restartRequired = false; 424 for (PluginInformation pi : pluginDownloadTask.getDownloadedPlugins()) { 425 if (!model.getNewlyActivatedPlugins().contains(pi) || !pi.canloadatruntime) { 426 restartRequired = true; 427 break; 428 } 429 } 430 notifyDownloadResults(pnlPluginPreferences, pluginDownloadTask, restartRequired); 431 431 model.refreshLocalPluginVersion(pluginDownloadTask.getDownloadedPlugins()); 432 432 model.clearPendingPlugins(pluginDownloadTask.getDownloadedPlugins()); -
trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r7419 r8018 127 127 } else { 128 128 // Ask for restart to install new plugin 129 PluginPreference.notifyDownloadResults(Main.parent, pluginDownloadTask); 129 PluginPreference.notifyDownloadResults( 130 Main.parent, pluginDownloadTask, !pluginDownloadTask.getDownloadedPlugins().isEmpty()); 130 131 } 131 132 }
Note:
See TracChangeset
for help on using the changeset viewer.