Changeset 7722 in josm for trunk/src/org/openstreetmap/josm/gui/download
- Timestamp:
- 2014-11-12T02:42:30+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r7434 r7722 78 78 protected JCheckBox cbDownloadOsmData; 79 79 protected JCheckBox cbDownloadGpxData; 80 protected JCheckBox cbDownloadNotes; 80 81 /** the download action and button */ 81 82 private DownloadAction actDownload; … … 98 99 cbDownloadGpxData = new JCheckBox(tr("Raw GPS data")); 99 100 cbDownloadGpxData.setToolTipText(tr("Select to download GPS traces in the selected download area.")); 100 pnl.add(cbDownloadGpxData, GBC.eol().insets(5,5,1,5)); 101 //TODO: uncomment this and remove logic below once notes are enabled 102 //pnl.add(cbDownloadGpxData, GBC.std().insets(5,5,1,5)); 103 cbDownloadNotes = new JCheckBox(tr("Notes")); 104 cbDownloadNotes.setToolTipText(tr("Select to download notes in the selected download area.")); 105 if (Main.pref.getBoolean("osm.notes.enableDownload", false)) { 106 pnl.add(cbDownloadGpxData, GBC.std().insets(5,5,1,5)); 107 pnl.add(cbDownloadNotes, GBC.eol().insets(50, 5, 1, 5)); 108 } else { 109 pnl.add(cbDownloadGpxData, GBC.eol().insets(5,5,1,5)); 110 } 101 111 102 112 // hook for subclasses … … 174 184 makeCheckBoxRespondToEnter(cbDownloadGpxData); 175 185 makeCheckBoxRespondToEnter(cbDownloadOsmData); 186 makeCheckBoxRespondToEnter(cbDownloadNotes); 176 187 makeCheckBoxRespondToEnter(cbNewLayer); 177 188 … … 279 290 280 291 /** 292 * Replies true if user selected to download notes 293 * 294 * @return true if user selected to download notes 295 */ 296 public boolean isDownloadNotes() { 297 return cbDownloadNotes.isSelected(); 298 } 299 300 /** 281 301 * Replies true if the user requires to download into a new layer 282 302 * … … 314 334 Main.pref.put("download.osm", cbDownloadOsmData.isSelected()); 315 335 Main.pref.put("download.gps", cbDownloadGpxData.isSelected()); 336 Main.pref.put("download.notes", cbDownloadNotes.isSelected()); 316 337 Main.pref.put("download.newlayer", cbNewLayer.isSelected()); 317 338 if (currentBounds != null) { … … 326 347 cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true)); 327 348 cbDownloadGpxData.setSelected(Main.pref.getBoolean("download.gps", false)); 349 //TODO: This is to make sure notes are not downloaded if the Notes checkbox isn't being displayed. 350 // Make it look like the ones above when notes are enabled 351 boolean downloadNotes = Main.pref.getBoolean("download.notes", false) 352 && Main.pref.getBoolean("osm.notes.enableDownload", false); 353 cbDownloadNotes.setSelected(downloadNotes); 328 354 cbNewLayer.setSelected(Main.pref.getBoolean("download.newlayer", false)); 329 355 cbStartup.setSelected( isAutorunEnabled() ); … … 458 484 return; 459 485 } 486 //TODO: add notes into this logic once they are fully enabled in core 460 487 if (!isDownloadOsmData() && !isDownloadGpxData()) { 461 488 JOptionPane.showMessageDialog(
Note:
See TracChangeset
for help on using the changeset viewer.