Ignore:
Timestamp:
2016-10-07T21:55:54+02:00 (8 years ago)
Author:
simon04
Message:

fix #13320 - Use restart text and icon in unsaved changes dialog

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

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

    r10436 r11093  
    1010
    1111import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.gui.io.SaveLayersDialog;
    1213import org.openstreetmap.josm.gui.layer.Layer;
    1314import org.openstreetmap.josm.tools.Shortcut;
     
    3435            return;
    3536        }
    36         if (!Main.saveUnsavedModifications(Collections.singletonList(activeLayer), false)) {
     37        if (!SaveLayersDialog.saveUnsavedModifications(Collections.singletonList(activeLayer), SaveLayersDialog.Reason.DELETE)) {
    3738            return;
    3839        }
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r6380 r11093  
    2828    @Override
    2929    public void actionPerformed(ActionEvent e) {
    30         Main.exitJosm(true, 0);
     30        Main.exitJosm(true, 0, null);
    3131    }
    3232}
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r10212 r11093  
    1717import org.openstreetmap.josm.Main;
    1818import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
     19import org.openstreetmap.josm.gui.io.SaveLayersDialog;
    1920import org.openstreetmap.josm.tools.ImageProvider;
    2021import org.openstreetmap.josm.tools.Shortcut;
     
    5960        String scriptRestart = System.getProperty("josm.restart");
    6061        if ("true".equals(scriptRestart)) {
    61             Main.exitJosm(true, 9);
     62            Main.exitJosm(true, 9, SaveLayersDialog.Reason.RESTART);
    6263        }
    6364
     
    8384     */
    8485    public static void restartJOSM() throws IOException {
    85         if (isRestartSupported() && !Main.exitJosm(false, 0)) return;
     86        if (isRestartSupported() && !Main.exitJosm(false, 0, SaveLayersDialog.Reason.RESTART)) return;
    8687        final List<String> cmd;
    8788        // special handling for OSX .app package
Note: See TracChangeset for help on using the changeset viewer.