Changeset 8071 in josm for trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
- Timestamp:
- 2015-02-15T21:10:53+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
r7808 r8071 99 99 cbDownloadGpxData = new JCheckBox(tr("Raw GPS data")); 100 100 cbDownloadGpxData.setToolTipText(tr("Select to download GPS traces in the selected download area.")); 101 //TODO: uncomment this and remove logic below once notes are enabled 102 //pnl.add(cbDownloadGpxData, GBC.std().insets(5,5,1,5)); 101 pnl.add(cbDownloadGpxData, GBC.std().insets(5,5,1,5)); 103 102 cbDownloadNotes = new JCheckBox(tr("Notes")); 104 103 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 } 104 pnl.add(cbDownloadNotes, GBC.eol().insets(50, 5, 1, 5)); 111 105 112 106 // hook for subclasses … … 205 199 } 206 200 201 /** 202 * Constructs a new {@code DownloadDialog}. 203 * @param parent the parent component 204 */ 207 205 public DownloadDialog(Component parent) { 208 206 super(JOptionPane.getFrameForComponent(parent),tr("Download"), ModalityType.DOCUMENT_MODAL); … … 247 245 /** 248 246 * Distributes a "bounding box changed" from one DownloadSelection 249 * object to the others, so they may update or clear their input 250 * fields. 247 * object to the others, so they may update or clear their input fields. 251 248 * 252 249 * @param eventSource - the DownloadSelection object that fired this notification. … … 347 344 cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true)); 348 345 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); 346 cbDownloadNotes.setSelected(Main.pref.getBoolean("download.notes", false)); 354 347 cbNewLayer.setSelected(Main.pref.getBoolean("download.newlayer", false)); 355 348 cbStartup.setSelected( isAutorunEnabled() ); … … 485 478 } 486 479 if (!isDownloadOsmData() && !isDownloadGpxData() && !isDownloadNotes()) { 487 //TODO: When notes are enabled, change this message to include downloading notes488 480 JOptionPane.showMessageDialog( 489 481 DownloadDialog.this, 490 tr("<html>Neither <strong>{0}</strong> nor <strong>{1}</strong> is enabled.<br>"491 + "Please choose to either download OSM data, or GPX data, or both.</html>",482 tr("<html>Neither <strong>{0}</strong> nor <strong>{1}</strong> nor <strong>{2}</strong> is enabled.<br>" 483 + "Please choose to either download OSM data, or GPX data, or Notes, or all.</html>", 492 484 cbDownloadOsmData.getText(), 493 cbDownloadGpxData.getText() 485 cbDownloadGpxData.getText(), 486 cbDownloadNotes.getText() 494 487 ), 495 488 tr("Error"),
Note:
See TracChangeset
for help on using the changeset viewer.