Changeset 17041 in josm


Ignore:
Timestamp:
2020-09-19T13:51:30+02:00 (4 years ago)
Author:
Klumbumbus
Message:

fix #19820 - Add icons for different offline modes

Location:
trunk
Files:
5 added
2 edited

Legend:

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

    r16929 r17041  
    4545
    4646        ToggleOnlineResourceAction(OnlineResource onlineResource) {
    47             super(onlineResource.getLocName(), null, null, null, false);
     47            super(onlineResource.getLocName(), onlineResource.getOfflineIcon(), null, null, false);
    4848            this.onlineResource = onlineResource;
    4949            setToolbarId("menu:offline:" + onlineResource.name());
  • trunk/src/org/openstreetmap/josm/io/OnlineResource.java

    r16877 r17041  
    3939        return locName;
    4040    }
     41   
     42    /**
     43     * Replies the offline icon.
     44     * @return the offline icon
     45     */
     46    public final String getOfflineIcon() {
     47        switch (this) {
     48            case OSM_API:
     49                return /* ICON() */ "offline_osm_api";
     50            case JOSM_WEBSITE:
     51                return /* ICON() */ "offline_josm_website";
     52            case CACHE_UPDATES:
     53                return /* ICON() */ "offline_cache_updates";
     54            case CERTIFICATES:
     55                return /* ICON() */ "offline_certificates";
     56            case ALL:
     57                return /* ICON() */ "offline_all";
     58            default:
     59                return null;
     60        }
     61    }
    4162
    4263    /**
Note: See TracChangeset for help on using the changeset viewer.