Changeset 17021 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-09-12T20:48:56+02:00 (4 years ago)
Author:
stoecker
Message:

fix #19786, Add missing icons to View menu

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DrawBoundariesOfDownloadedDataAction.java

    r16529 r17021  
    88import org.openstreetmap.josm.gui.MainApplication;
    99import org.openstreetmap.josm.gui.preferences.display.DrawingPreference;
     10import org.openstreetmap.josm.tools.ImageProvider;
    1011
    1112/**
     
    2122    public DrawBoundariesOfDownloadedDataAction() {
    2223        super(tr("Draw boundaries of downloaded data"),
     24                new ImageProvider("hatched.svg"),
    2325                tr("Enable/disable hatched background rendering of areas outside of the downloaded areas."),
    2426                DrawingPreference.SOURCE_BOUNDS_PROP
  • trunk/src/org/openstreetmap/josm/actions/PreferenceToggleAction.java

    r16529 r17021  
    1010import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
    1111import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
     12import org.openstreetmap.josm.tools.ImageProvider;
    1213
    1314/**
     
    2930     */
    3031    public PreferenceToggleAction(String name, String tooltip, BooleanProperty pref) {
    31         super(name, null, tooltip, null, false);
     32        this(name, null, tooltip, pref);
     33    }
     34
     35    /**
     36     * Create a new PreferenceToggleAction.
     37     * @param name the (translated) title
     38     * @param icon icon to display e.g. in menu
     39     * @param tooltip tooltip text
     40     * @param pref the preference to toggle
     41     * @since 17021
     42     */
     43    public PreferenceToggleAction(String name, ImageProvider icon, String tooltip, BooleanProperty pref) {
     44        super(name, icon, tooltip, null, false, null, true);
    3245        setToolbarId("toggle-" + pref.getKey());
    3346        this.pref = pref;
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r16967 r17021  
    133133import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSearchPrimitiveDialog;
    134134import org.openstreetmap.josm.spi.preferences.Config;
     135import org.openstreetmap.josm.tools.ImageProvider;
    135136import org.openstreetmap.josm.tools.PlatformManager;
    136137import org.openstreetmap.josm.tools.Shortcut;
     
    828829        viewMenu.addSeparator();
    829830        viewMenu.add(new PreferenceToggleAction(tr("Main toolbar"),
     831                new ImageProvider("dialogs/main_toolbar.svg"),
    830832                tr("Toggles the visibility of the main toolbar (i.e., the horizontal toolbar)"),
    831833                MapFrame.TOOLBAR_VISIBLE).getCheckbox());
    832834        viewMenu.add(new PreferenceToggleAction(tr("Edit toolbar"),
     835                new ImageProvider("dialogs/edit_toolbar.svg"),
    833836                tr("Toggles the visibility of the edit toolbar (i.e., the vertical tool)"),
    834837                MapFrame.SIDE_TOOLBAR_VISIBLE).getCheckbox());
Note: See TracChangeset for help on using the changeset viewer.