Ignore:
Timestamp:
2017-09-13T23:24:50+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - use Config.getPref() wherever possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r12841 r12846  
    7272import org.openstreetmap.josm.io.CachedFile;
    7373import org.openstreetmap.josm.plugins.PluginHandler;
     74import org.openstreetmap.josm.spi.preferences.Config;
    7475import org.w3c.dom.Element;
    7576import org.w3c.dom.Node;
     
    122123    public enum ImageSizes {
    123124        /** SMALL_ICON value of an Action */
    124         SMALLICON(Main.pref.getInt("iconsize.smallicon", 16)),
     125        SMALLICON(Config.getPref().getInt("iconsize.smallicon", 16)),
    125126        /** LARGE_ICON_KEY value of an Action */
    126         LARGEICON(Main.pref.getInt("iconsize.largeicon", 24)),
     127        LARGEICON(Config.getPref().getInt("iconsize.largeicon", 24)),
    127128        /** map icon */
    128         MAP(Main.pref.getInt("iconsize.map", 16)),
     129        MAP(Config.getPref().getInt("iconsize.map", 16)),
    129130        /** map icon maximum size */
    130         MAPMAX(Main.pref.getInt("iconsize.mapmax", 48)),
     131        MAPMAX(Config.getPref().getInt("iconsize.mapmax", 48)),
    131132        /** cursor icon size */
    132         CURSOR(Main.pref.getInt("iconsize.cursor", 32)),
     133        CURSOR(Config.getPref().getInt("iconsize.cursor", 32)),
    133134        /** cursor overlay icon size */
    134135        CURSOROVERLAY(CURSOR),
     
    142143         * @since 8323
    143144         */
    144         LAYER(Main.pref.getInt("iconsize.layer", 16)),
     145        LAYER(Config.getPref().getInt("iconsize.layer", 16)),
    145146        /** Toolbar button icon size
    146147         * @since 9253
     
    150151         * @since 9253
    151152         */
    152         SIDEBUTTON(Main.pref.getInt("iconsize.sidebutton", 20)),
     153        SIDEBUTTON(Config.getPref().getInt("iconsize.sidebutton", 20)),
    153154        /** Settings tab icon size
    154155         * @since 9253
    155156         */
    156         SETTINGS_TAB(Main.pref.getInt("iconsize.settingstab", 48)),
     157        SETTINGS_TAB(Config.getPref().getInt("iconsize.settingstab", 48)),
    157158        /**
    158159         * The default image size
    159160         * @since 9705
    160161         */
    161         DEFAULT(Main.pref.getInt("iconsize.default", 24)),
     162        DEFAULT(Config.getPref().getInt("iconsize.default", 24)),
    162163        /**
    163164         * Splash dialog logo size
     
    10181019                "https://wiki.openstreetmap.org/wiki/File:"
    10191020                );
    1020         final Collection<String> baseUrls = Main.pref.getList("image-provider.wiki.urls", defaultBaseUrls);
     1021        final Collection<String> baseUrls = Config.getPref().getList("image-provider.wiki.urls", defaultBaseUrls);
    10211022
    10221023        final String fn = name.substring(name.lastIndexOf('/') + 1);
Note: See TracChangeset for help on using the changeset viewer.