Ignore:
Timestamp:
2014-08-20T03:07:15+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #8885 (see #4614) - add offline mode with new command line argument --offline which can take one of several of these values (comma separated):

  • josm_website: to disable all accesses to JOSM website (when not cached, disables Getting Started page, help, plugin list, styles, imagery, presets, rules)
  • osm_api: to disable all accesses to OSM API (disables download, upload, changeset queries, history, user message notification)
  • all: alias to disable all values. Currently equivalent to "josm_website,osm_api"

Plus improved javadoc, fixed EDT violations, and fixed a bug with HTTP redirection sent without "Location" header

File:
1 edited

Legend:

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

    r6814 r7434  
    2222import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2323import org.openstreetmap.josm.io.MultiFetchServerObjectReader;
     24import org.openstreetmap.josm.io.OnlineResource;
    2425import org.openstreetmap.josm.tools.Shortcut;
    2526
     
    122123    @Override
    123124    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
    124         setEnabled(selection != null && !selection.isEmpty());
     125        setEnabled(selection != null && !selection.isEmpty() && !Main.isOffline(OnlineResource.OSM_API));
    125126    }
    126127
Note: See TracChangeset for help on using the changeset viewer.