Modify ↓
#24163 closed enhancement (fixed)
[patch] Show graceful message after successful plugin download
Reported by: | gaben | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 25.02 |
Component: | Core | Version: | |
Keywords: | template_report download plugin message | Cc: |
Description
What steps will reproduce the problem?
- Download a plugin,
gridify
in my example - Check the status window
What is the expected result?
If the download is successful, don't show warning, but information(?). Like this:
What happens instead?
After successful download, JOSM saying warning for no reason.
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.
-
src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
139 139 MainApplication.getMenu().restart.actionPerformed(null); 140 140 } 141 141 } else if (task != null && !task.isCanceled()) { 142 Collection<PluginInformation> failed = task.getFailedPlugins(); 142 143 JOptionPane.showMessageDialog( 143 144 MainApplication.getMainFrame(), 144 145 sb.toString(), 145 tr("Warning"),146 JOptionPane.WARNING_MESSAGE146 !failed.isEmpty() ? tr("Warning") : tr("Information"), 147 !failed.isEmpty() ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE 147 148 ); 148 149 }
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
The code around this panel could be simplified/refactored because it feels like glue sometimes. E.g. the task failure check is done twice, once for the UI, and once for the strings in two separate classes. Anyway, the patch I proposed is a quick fix.