Ticket #6725: 6725.patch

File 6725.patch, 2.1 KB (added by GerdP, 3 years ago)
  • src/org/openstreetmap/josm/gui/MainApplication.java

     
    12221222    static void loadLatePlugins(SplashScreen splash, SplashProgressMonitor monitor, Collection<PluginInformation> pluginsToLoad) {
    12231223        monitor.indeterminateSubTask(tr("Loading plugins"));
    12241224        PluginHandler.loadLatePlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false));
    1225         GuiHelper.runInEDTAndWait(() -> toolbar.refreshToolbarControl());
     1225        GuiHelper.runInEDTAndWait(() -> {
     1226            toolbar.enableInfoAboutMissingAction();
     1227            toolbar.refreshToolbarControl();
     1228        });
    12261229    }
    12271230
    12281231    private static void processOffline(ProgramArguments args) {
  • src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

     
    582582
    583583    public final JToolBar control = new JToolBar();
    584584    private final Map<Object, ActionDefinition> buttonActions = new ConcurrentHashMap<>(30);
     585    private boolean showInfoAboutMissingActions;
    585586
    586587    @Override
    587588    public PreferenceSetting createPreferenceSetting() {
     
    11121113                ActionDefinition a = actionParser.loadAction(s);
    11131114                if (a != null) {
    11141115                    result.add(a);
    1115                 } else {
     1116                } else if (showInfoAboutMissingActions) {
    11161117                    Logging.info("Could not load tool definition "+s);
    11171118                }
    11181119            }
     
    12921293    public void taggingPresetsModified() {
    12931294        refreshToolbarControl();
    12941295    }
     1296
     1297    /**
     1298     * Call with {@code true} when all plugins were loaded.
     1299     * @since xxx
     1300     */
     1301    public void enableInfoAboutMissingAction() {
     1302        this.showInfoAboutMissingActions = true;
     1303    }
     1304
     1305
    12951306}