Changeset 6125 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2013-08-09T16:08:30+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r6084 r6125 747 747 * @since 3378 748 748 */ 749 public static boolean exitJosm(boolean exit ) {749 public static boolean exitJosm(boolean exit, int exitCode) { 750 750 if (Main.saveUnsavedModifications()) { 751 751 geometry.remember("gui.geometry"); … … 762 762 } 763 763 if (exit) { 764 System.exit( 0);764 System.exit(exitCode); 765 765 } 766 766 return true; -
trunk/src/org/openstreetmap/josm/actions/ExitAction.java
r6084 r6125 28 28 @Override 29 29 public void actionPerformed(ActionEvent e) { 30 Main.exitJosm(true );30 Main.exitJosm(true, 0); 31 31 } 32 32 } -
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r6111 r6125 43 43 @Override 44 44 public void actionPerformed(ActionEvent e) { 45 // If JOSM has been started with property 'josm.restart=true' this means 46 // it is executed by a start script that can handle restart. 47 // Request for restart is indicated by exit code 9. 48 String scriptRestart = System.getProperty("josm.restart"); 49 if ("true".equals(scriptRestart)) { 50 Main.exitJosm(true, 9); 51 } 52 45 53 try { 46 54 restartJOSM(); … … 64 72 */ 65 73 public static void restartJOSM() throws IOException { 66 if (isRestartSupported() && !Main.exitJosm(false )) return;74 if (isRestartSupported() && !Main.exitJosm(false, 0)) return; 67 75 try { 68 76 // java binary -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r6108 r6125 84 84 mainFrame.addWindowListener(new WindowAdapter(){ 85 85 @Override public void windowClosing(final WindowEvent arg0) { 86 Main.exitJosm(true );86 Main.exitJosm(true, 0); 87 87 } 88 88 }); -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6084 r6125 51 51 //System.out.println("Going to handle method "+method+" (short: "+method.getName()+") with event "+args[0]); 52 52 if (method.getName().equals("handleQuit")) { 53 handled = Main.exitJosm(false );53 handled = Main.exitJosm(false, 0); 54 54 } else if (method.getName().equals("handleAbout")) { 55 55 Main.main.menu.about.actionPerformed(null);
Note:
See TracChangeset
for help on using the changeset viewer.