- Timestamp:
- 2007-04-03T13:49:40+02:00 (17 years ago)
- Location:
- src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/data/Preferences.java
r195 r205 61 61 */ 62 62 public String getPreferencesDir() { 63 if (System.getenv("APPDATA") != null) 64 return System.getenv("APPDATA")+"/JOSM/"; 63 65 return System.getProperty("user.home")+"/.josm/"; 64 66 } -
src/org/openstreetmap/josm/gui/MainApplication.java
r198 r205 84 84 // get the preferences. 85 85 final File prefDir = new File(Main.pref.getPreferencesDir()); 86 87 // check if preferences directory has moved (TODO: Update code. Remove this after some time) 88 File oldPrefDir = new File(System.getProperty("user.home")+"/.josm"); 89 if (!prefDir.isDirectory() && oldPrefDir.isDirectory()) { 90 if (oldPrefDir.renameTo(prefDir)) { 91 // do not translate this 92 JOptionPane.showMessageDialog(null, "The preference directory has been moved to "+prefDir); 93 } else { 94 JOptionPane.showMessageDialog(null, "The preference directory location has changed. Please move "+oldPrefDir+" to "+prefDir); 95 } 96 } 97 86 98 if (prefDir.exists() && !prefDir.isDirectory()) { 87 99 JOptionPane.showMessageDialog(null, "Cannot open preferences directory: "+Main.pref.getPreferencesDir()); … … 105 117 if (args.containsKey("default-classloader")) 106 118 PluginInformation.useJosmClassloader = true; 107 119 108 120 // load the early plugins 109 121 if (Main.pref.hasKey("plugins")) { 110 122 for (String pluginName : Main.pref.get("plugins").split(",")) { 111 123 try { … … 169 181 public void run() { 170 182 main.postConstructorProcessCmdLine(args); 171 183 } 172 184 }); 173 185 } -
src/org/openstreetmap/josm/gui/MapFrame.java
r198 r205 51 51 public MapView mapView; 52 52 /** 53 * The toolbar with the action icons 53 * The toolbar with the action icons. To add new toggle dialog actions, use addToggleDialog 54 * instead of adding directly to this list. 54 55 */ 55 56 public JToolBar toolBarActions = new JToolBar(JToolBar.VERTICAL); … … 60 61 61 62 public ConflictDialog conflictDialog; 62 private JPanel toggleDialogs = new JPanel(); 63 /** 64 * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog 65 * instead of adding directly to this list. 66 */ 67 public JPanel toggleDialogs = new JPanel(); 63 68 64 69 public final ButtonGroup toolGroup = new ButtonGroup(); … … 118 123 toggleDialogs.setLayout(new BoxLayout(toggleDialogs, BoxLayout.Y_AXIS)); 119 124 120 add IconToggle(toggleDialogs,new LayerListDialog(this));121 add IconToggle(toggleDialogs,new PropertiesDialog(this));122 add IconToggle(toggleDialogs,new HistoryDialog());123 add IconToggle(toggleDialogs,new SelectionListDialog());124 add IconToggle(toggleDialogs,conflictDialog = new ConflictDialog());125 add IconToggle(toggleDialogs,new CommandStackDialog(this));125 addToggleDialog(new LayerListDialog(this)); 126 addToggleDialog(new PropertiesDialog(this)); 127 addToggleDialog(new HistoryDialog()); 128 addToggleDialog(new SelectionListDialog()); 129 addToggleDialog(conflictDialog = new ConflictDialog()); 130 addToggleDialog(new CommandStackDialog(this)); 126 131 127 132 // status line below the map … … 147 152 } 148 153 149 private void addIconToggle(JPanel toggleDialogs, ToggleDialog dlg) { 154 /** 155 * Call this to add new toggle dialogs to the left button-list 156 * @param dlg The toggle dialog. It must not be in the list already. 157 */ 158 public void addToggleDialog(ToggleDialog dlg) { 150 159 IconToggleButton button = new IconToggleButton(dlg.action); 151 160 dlg.action.button = button; -
src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
r203 r205 359 359 JComboBox value = new JComboBox(e.getValue().toArray()); 360 360 value.setEditable(true); 361 value.getEditor().setItem( valueCount.get(e.getKey()) != newSelection.size() ? tr("<different>") : e.getValue().iterator().next());361 value.getEditor().setItem(e.getValue().size() > 1 || valueCount.get(e.getKey()) != newSelection.size() ? tr("<different>") : e.getValue().iterator().next()); 362 362 data.addRow(new Object[]{e.getKey(), value}); 363 363 } -
src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
r202 r205 65 65 JOptionPane.YES_NO_OPTION); 66 66 if (answer == JOptionPane.OK_OPTION) { 67 plugins.remove(pluginName);67 while (plugins.remove(pluginName)) {} 68 68 String p = ""; 69 69 for (String s : plugins) … … 157 157 if (c.contains("landsat.") || c.contains(".LandsatLayer")) 158 158 return "landsat"; 159 if (c.contains("livegps.")) 160 return "livegps"; 159 161 if (c.contains("mappaint.")) 160 162 return "mappaint";
Note:
See TracChangeset
for help on using the changeset viewer.