Ignore:
Timestamp:
2018-08-11T16:10:32+02:00 (9 months ago)
Author:
Don-vip
Message:

see #15229 - deprecate all Main methods returning an URL

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

Legend:

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

    r13043 r14119  
    1515import javax.swing.JPopupMenu;
    1616
    17 import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.data.StructUtils;
    1918import org.openstreetmap.josm.data.StructUtils.StructEntry;
     
    5251
    5352    private static final List<ChangesetViewerEntry> DEFAULT_ENTRIES = Arrays.asList(
    54             new ChangesetViewerEntry(tr("View changeset in web browser"), Main.getBaseBrowseUrl() + "/changeset/{0}"),
     53            new ChangesetViewerEntry(tr("View changeset in web browser"), Config.getUrls().getBaseBrowseUrl() + "/changeset/{0}"),
    5554            new ChangesetViewerEntry(tr("Open {0}", "achavi (Augmented OSM Change Viewer)"), "https://overpass-api.de/achavi/?changeset={0}"),
    5655            new ChangesetViewerEntry(tr("Open {0}", "OSMCha (OSM Changeset Analyzer)"), "https://osmcha.mapbox.com/changesets/{0}"),
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r13853 r14119  
    2626import javax.swing.plaf.basic.BasicArrowButton;
    2727
    28 import org.openstreetmap.josm.Main;
    2928import org.openstreetmap.josm.data.UserIdentityManager;
    3029import org.openstreetmap.josm.data.osm.Changeset;
     
    3938import org.openstreetmap.josm.gui.widgets.JMultilineLabel;
    4039import org.openstreetmap.josm.gui.widgets.UrlLabel;
     40import org.openstreetmap.josm.spi.preferences.Config;
    4141import org.openstreetmap.josm.tools.CheckParameterUtil;
    4242import org.openstreetmap.josm.tools.GBC;
     
    215215
    216216    protected static String getUserUrl(String username) {
    217         return Main.getBaseUserUrl() + '/' + Utils.encodeUrl(username).replaceAll("\\+", "%20");
     217        return Config.getUrls().getBaseUserUrl() + '/' + Utils.encodeUrl(username).replaceAll("\\+", "%20");
    218218    }
    219219
     
    248248        if (!isLatest && cs != null) {
    249249            User user = cs.getUser();
    250             String url = Main.getBaseBrowseUrl() + "/changeset/" + cs.getId();
     250            String url = Config.getUrls().getBaseBrowseUrl() + "/changeset/" + cs.getId();
    251251            lblChangeset.setUrl(url);
    252252            lblChangeset.setDescription(Long.toString(cs.getId()));
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java

    r13130 r14119  
    2727import javax.swing.table.TableCellRenderer;
    2828
    29 import org.openstreetmap.josm.Main;
    3029import org.openstreetmap.josm.actions.AbstractInfoAction;
    3130import org.openstreetmap.josm.data.osm.User;
     
    162161            if (infoObject instanceof HistoryOsmPrimitive) {
    163162                HistoryOsmPrimitive prim = (HistoryOsmPrimitive) infoObject;
    164                 return Main.getBaseBrowseUrl() + "/changeset/" + prim.getChangesetId();
     163                return Config.getUrls().getBaseBrowseUrl() + "/changeset/" + prim.getChangesetId();
    165164            } else {
    166165                return null;
     
    199198            if (infoObject instanceof HistoryOsmPrimitive) {
    200199                HistoryOsmPrimitive hp = (HistoryOsmPrimitive) infoObject;
    201                 return hp.getUser() == null ? null : Main.getBaseUserUrl() + '/' + hp.getUser().getName();
     200                return hp.getUser() == null ? null : Config.getUrls().getBaseUserUrl() + '/' + hp.getUser().getName();
    202201            } else {
    203202                return null;
Note: See TracChangeset for help on using the changeset viewer.