Ignore:
Timestamp:
2006-11-28T19:58:41+01:00 (19 years ago)
Author:
imi
Message:
  • added "new empty map" action
  • added osm-server.version property (set the OSM server verion. For expert users only)
  • added first support for ongoing 0.4 server api
  • fixed Class-Path manifest attribute for plugins (" " is Seperator)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/Main.java

    r159 r169  
    168168                toolBar.add(menu.upload);
    169169                toolBar.addSeparator();
     170                toolBar.add(menu.newAction);
    170171                toolBar.add(menu.open);
    171172                toolBar.add(menu.save);
     
    323324        }
    324325
     326        public static boolean breakBecauseUnsavedChanges() {
     327            if (map != null) {
     328                boolean modified = false;
     329                boolean uploadedModified = false;
     330                for (final Layer l : map.mapView.getAllLayers()) {
     331                        if (l instanceof OsmDataLayer && ((OsmDataLayer)l).isModified()) {
     332                                modified = true;
     333                                uploadedModified = ((OsmDataLayer)l).uploadedModified;
     334                                break;
     335                        }
     336                }
     337                if (modified) {
     338                        final String msg = uploadedModified ? "\n"+tr("Hint: Some changes came from uploading new data to the server.") : "";
     339                        final int answer = JOptionPane.showConfirmDialog(
     340                                        parent, tr("There are unsaved changes. Discard the changes and continue?")+msg,
     341                                        tr("Unsaved Changes"), JOptionPane.YES_NO_OPTION);
     342                        if (answer != JOptionPane.YES_OPTION)
     343                                return true;
     344                }
     345            }
     346            return false;
     347    }
     348       
    325349        private static void downloadFromParamString(final boolean rawGps, String s) {
    326350                if (s.startsWith("http:")) {
Note: See TracChangeset for help on using the changeset viewer.