Changeset 5201 in josm for trunk/src/org/openstreetmap/josm/gui/MainApplication.java
- Timestamp:
- 2012-04-21T09:25:21+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r4932 r5201 13 13 import java.net.Authenticator; 14 14 import java.net.ProxySelector; 15 import java.net.URL; 15 16 import java.security.AllPermission; 16 17 import java.security.CodeSource; … … 31 32 import org.openstreetmap.josm.Main; 32 33 import org.openstreetmap.josm.data.AutosaveTask; 34 import org.openstreetmap.josm.data.CustomConfigurator; 33 35 import org.openstreetmap.josm.data.Preferences; 34 36 import org.openstreetmap.josm.data.Version; … … 103 105 "\t--[no-]maximize "+tr("Launch in maximized mode")+"\n"+ 104 106 "\t--reset-preferences "+tr("Reset the preferences to default")+"\n\n"+ 107 "\t--load-preferences=<url-to-xml> "+tr("Changes preferences according to the XML file")+"\n\n"+ 105 108 "\t--set=<key>=<value> "+tr("Set preference key to value")+"\n\n"+ 106 109 "\t--language=<language> "+tr("Set the language")+"\n\n"+ … … 202 205 Main.pref.updateSystemProperties(); 203 206 207 JFrame mainFrame = new JFrame(tr("Java OpenStreetMap Editor")); 208 Main.parent = mainFrame; 209 210 if (args.containsKey("load-preferences")) { 211 CustomConfigurator.XMLCommandProcessor config = new CustomConfigurator.XMLCommandProcessor(Main.pref); 212 for (String i : args.get("load-preferences")) { 213 System.out.println("Reading preferences from " + i); 214 try { 215 URL url = new URL(i); 216 config.openAndReadXML(url.openStream()); 217 } catch (Exception ex) { 218 throw new RuntimeException(ex); 219 } 220 } 221 } 222 204 223 if (args.containsKey("set")) { 205 224 for (String i : args.get("set")) { … … 248 267 249 268 monitor.indeterminateSubTask(tr("Creating main GUI")); 250 JFrame mainFrame = new JFrame(tr("Java OpenStreetMap Editor"));251 Main.parent = mainFrame;252 269 Main.addListener(); 253 270 final Main main = new MainApplication(mainFrame);
Note:
See TracChangeset
for help on using the changeset viewer.