Changeset 5861 in josm
- Timestamp:
- 2013-04-14T19:26:01+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java
r5085 r5861 34 34 public class RemoteControlPreference extends DefaultTabPreferenceSetting { 35 35 36 /** 37 * Factory used to build a new instance of this preference setting 38 */ 36 39 public static class Factory implements PreferenceSettingFactory { 37 40 … … 120 123 Main.pref.put(RequestHandler.globalConfirmationKey, alwaysAskUserConfirm.isSelected()); 121 124 } 122 return changed; 125 if (changed) { 126 if (enabled) { 127 RemoteControl.start(); 128 } else { 129 RemoteControl.stop(); 130 } 131 } 132 return false; 123 133 } 124 134 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java
r5707 r5861 35 35 36 36 /** 37 * Stops the remote control server 38 * @since 5861 39 */ 40 public static void stop() { 41 RemoteControlHttpServer.stopRemoteControlHttpServer(); 42 } 43 44 /** 37 45 * Adds external request handler. 38 46 * Can be used by plugins that want to use remote control. -
trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
r4797 r5861 32 32 public static void restartRemoteControlHttpServer() { 33 33 try { 34 if (instance != null) { 35 instance.stopServer(); 36 } 34 stopRemoteControlHttpServer(); 37 35 38 36 instance = new RemoteControlHttpServer(DEFAULT_PORT); … … 43 41 } catch (IOException ioe) { 44 42 ioe.printStackTrace(); 43 } 44 } 45 46 /** 47 * Stops the HTTP server 48 * @since 5861 49 */ 50 public static void stopRemoteControlHttpServer() { 51 if (instance != null) { 52 try { 53 instance.stopServer(); 54 instance = null; 55 } catch (IOException ioe) { 56 ioe.printStackTrace(); 57 } 45 58 } 46 59 } … … 96 109 { 97 110 server.close(); 111 System.out.println("RemoteControl::Server stopped."); 98 112 } 99 113 }
Note:
See TracChangeset
for help on using the changeset viewer.