Ignore:
Timestamp:
2015-02-15T21:10:53+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #10960 - Add note API search dialog (modified patch by ToeBee). Enable notes by default

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r7808 r8071  
    9999        cbDownloadGpxData = new JCheckBox(tr("Raw GPS data"));
    100100        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));
    103102        cbDownloadNotes = new JCheckBox(tr("Notes"));
    104103        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));
    111105
    112106        // hook for subclasses
     
    205199    }
    206200
     201    /**
     202     * Constructs a new {@code DownloadDialog}.
     203     * @param parent the parent component
     204     */
    207205    public DownloadDialog(Component parent) {
    208206        super(JOptionPane.getFrameForComponent(parent),tr("Download"), ModalityType.DOCUMENT_MODAL);
     
    247245    /**
    248246     * 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.
    251248     *
    252249     * @param eventSource - the DownloadSelection object that fired this notification.
     
    347344        cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true));
    348345        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));
    354347        cbNewLayer.setSelected(Main.pref.getBoolean("download.newlayer", false));
    355348        cbStartup.setSelected( isAutorunEnabled() );
     
    485478            }
    486479            if (!isDownloadOsmData() && !isDownloadGpxData() && !isDownloadNotes()) {
    487                 //TODO: When notes are enabled, change this message to include downloading notes
    488480                JOptionPane.showMessageDialog(
    489481                        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>",
    492484                                cbDownloadOsmData.getText(),
    493                                 cbDownloadGpxData.getText()
     485                                cbDownloadGpxData.getText(),
     486                                cbDownloadNotes.getText()
    494487                        ),
    495488                        tr("Error"),
Note: See TracChangeset for help on using the changeset viewer.