Ignore:
Timestamp:
2014-08-20T03:07:15+02:00 (12 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/gui/GettingStarted.java

    r7082 r7434  
    3030import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
    3131import org.openstreetmap.josm.io.CacheCustomContent;
     32import org.openstreetmap.josm.io.OnlineResource;
    3233import org.openstreetmap.josm.tools.LanguageInfo;
    3334import org.openstreetmap.josm.tools.OpenBrowser;
     
    9596        }
    9697
     98        @Override
     99        protected void checkOfflineAccess() {
     100            OnlineResource.JOSM_WEBSITE.checkOfflineAccess(new WikiReader().getBaseUrlWiki(), Main.getJOSMWebsite());
     101        }
     102
    97103        /**
    98104         * Additionally check if JOSM has been updated and refresh MOTD
     
    151157                }
    152158
    153                 EventQueue.invokeLater(new Runnable() {
    154                     @Override
    155                     public void run() {
    156                         lg.setText(fixImageLinks(content));
    157                     }
    158                 });
     159                if (content != null) {
     160                    EventQueue.invokeLater(new Runnable() {
     161                        @Override
     162                        public void run() {
     163                            lg.setText(fixImageLinks(content));
     164                        }
     165                    });
     166                }
    159167            }
    160168        }, "MOTD-Loader");
Note: See TracChangeset for help on using the changeset viewer.