﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24163	[patch] Show graceful message after successful plugin download	gaben	team	"==== What steps will reproduce the problem?
1. Download a plugin, `gridify` in my example
2. Check the status window

==== What is the expected result?
If the download is successful, don't show warning, but information(?). Like this:

[[Image(after.png)]]

==== What happens instead?
After successful download, JOSM saying warning for no reason.

[[Image(before.png)]]

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Revision:19334
Is-Local-Build:true
Build-Date:2025-02-21 10:06:03
}}}

After borrowing some code from PluginPreference class, it works as expected.
{{{#!patch
Index: src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 19334)
+++ src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(working copy)
@@ -139,11 +139,12 @@
                     MainApplication.getMenu().restart.actionPerformed(null);
                 }
             } else if (task != null && !task.isCanceled()) {
+                Collection<PluginInformation> failed = task.getFailedPlugins();
                 JOptionPane.showMessageDialog(
                         MainApplication.getMainFrame(),
                         sb.toString(),
-                        tr(""Warning""),
-                        JOptionPane.WARNING_MESSAGE
+                        !failed.isEmpty() ? tr(""Warning"") : tr(""Information""),
+                        !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE
                         );
             }
}}}
"	enhancement	closed	minor	25.02	Core		fixed	template_report download plugin message	
