Changeset 10482 in josm


Ignore:
Timestamp:
2016-06-24T22:16:43+02:00 (5 years ago)
Author:
stoecker
Message:

see #12994 - don't warn about SideButton without icon

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/SideButton.java

    r10428 r10482  
    4242            setIcon(icon.getImageIconBounded(
    4343                ImageProvider.ImageSizes.SIDEBUTTON.getImageDimension()));
    44         } else { /* TODO: remove when calling code is fixed, replace by exception */
     44        } else if(getIcon() != null) { /* TODO: remove when calling code is fixed, replace by exception */
    4545            Main.warn("Old style SideButton usage for action " + action);
    4646            fixIcon(action);
  • trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java

    r10293 r10482  
    896896        class LaunchFileChooserAction extends AbstractAction {
    897897            LaunchFileChooserAction() {
    898                 putValue(SMALL_ICON, ImageProvider.get("open"));
     898                new ImageProvider("open").getResource().attachImageIcon(this);
    899899                putValue(SHORT_DESCRIPTION, tr("Launch a file chooser to select a file"));
    900900            }
     
    947947            putValue(NAME, tr("New"));
    948948            putValue(SHORT_DESCRIPTION, getStr(I18nString.NEW_SOURCE_ENTRY_TOOLTIP));
    949             putValue(SMALL_ICON, ImageProvider.get("dialogs", "add"));
     949            new ImageProvider("dialogs", "add").getResource().attachImageIcon(this);
    950950        }
    951951
     
    977977            putValue(NAME, tr("Remove"));
    978978            putValue(SHORT_DESCRIPTION, getStr(I18nString.REMOVE_SOURCE_TOOLTIP));
    979             putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
     979            new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this);
    980980            updateEnabledState();
    981981        }
     
    10001000            putValue(NAME, tr("Edit"));
    10011001            putValue(SHORT_DESCRIPTION, getStr(I18nString.EDIT_SOURCE_TOOLTIP));
    1002             putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
     1002            new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this);
    10031003            updateEnabledState();
    10041004        }
     
    10741074        ActivateSourcesAction() {
    10751075            putValue(SHORT_DESCRIPTION, getStr(I18nString.ACTIVATE_TOOLTIP));
    1076             putValue(SMALL_ICON, ImageProvider.get("preferences", "activate-right"));
     1076            new ImageProvider("preferences", "activate-right").getResource().attachImageIcon(this);
    10771077            updateEnabledState();
    10781078        }
     
    11281128            putValue(NAME, tr("Reset"));
    11291129            putValue(SHORT_DESCRIPTION, tr("Reset to default"));
    1130             putValue(SMALL_ICON, ImageProvider.get("preferences", "reset"));
     1130            new ImageProvider("preferences", "reset").getResource().attachImageIcon(this);
    11311131        }
    11321132
     
    11441144            putValue(NAME, tr("Reload"));
    11451145            putValue(SHORT_DESCRIPTION, tr(getStr(I18nString.RELOAD_ALL_AVAILABLE), url));
    1146             putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));
     1146            new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this);
    11471147            this.url = url;
    11481148            this.sourceProviders = sourceProviders;
     
    12621262            putValue(NAME, tr("New"));
    12631263            putValue(SHORT_DESCRIPTION, tr("Add a new icon path"));
    1264             putValue(SMALL_ICON, ImageProvider.get("dialogs", "add"));
     1264            new ImageProvider("dialogs", "add").getResource().attachImageIcon(this);
    12651265        }
    12661266
     
    12761276            putValue(NAME, tr("Remove"));
    12771277            putValue(SHORT_DESCRIPTION, tr("Remove the selected icon paths"));
    1278             putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
     1278            new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this);
    12791279            updateEnabledState();
    12801280        }
     
    12991299            putValue(NAME, tr("Edit"));
    13001300            putValue(SHORT_DESCRIPTION, tr("Edit the selected icon path"));
    1301             putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
     1301            new ImageProvider("dialogs", "edit").getResource().attachImageIcon(this);
    13021302            updateEnabledState();
    13031303        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java

    r10378 r10482  
    347347            putValue(NAME, tr("Download list"));
    348348            putValue(SHORT_DESCRIPTION, tr("Download the list of available plugins"));
    349             putValue(SMALL_ICON, ImageProvider.get("download"));
     349            new ImageProvider("download").getResource().attachImageIcon(this);
    350350        }
    351351
     
    384384            putValue(NAME, tr("Update plugins"));
    385385            putValue(SHORT_DESCRIPTION, tr("Update the selected plugins"));
    386             putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));
     386            new ImageProvider("dialogs", "refresh").getResource().attachImageIcon(this);
    387387        }
    388388
     
    486486            putValue(NAME, tr("Configure sites..."));
    487487            putValue(SHORT_DESCRIPTION, tr("Configure the list of sites where plugins are downloaded from"));
    488             putValue(SMALL_ICON, ImageProvider.get("dialogs", "settings"));
     488            new ImageProvider("dialogs", "settings").getResource().attachImageIcon(this);
    489489        }
    490490
Note: See TracChangeset for help on using the changeset viewer.