Changeset 2549 in josm for trunk/src/org


Ignore:
Timestamp:
2009-11-29T14:07:49+01:00 (12 years ago)
Author:
Gubaer
Message:

fixed #3065: Importing audio into the "Downloaded GPX Data" layer doesn't yield an error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java

    r2548 r2549  
    215215        importAudio.putClientProperty("help", "ImportAudio");
    216216        importAudio.addActionListener(new ActionListener() {
     217            private void warnCantImportIntoServerLayer(GpxLayer layer) {
     218                String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"
     219                        + "Because its way points don''t include a timestamp we can''t correlate them with audio data.</html>",
     220                        layer.getName()
     221                );
     222                HelpAwareOptionPane.showOptionDialog(
     223                        Main.parent,
     224                        msg,
     225                        tr("Import not possible"),
     226                        JOptionPane.WARNING_MESSAGE,
     227                        ht("/Action/ImportImages#CantImportIntoGpxLayerFromServer")
     228                );
     229            }
    217230            public void actionPerformed(ActionEvent e) {
     231                if (GpxLayer.this.data.fromServer) {
     232                    warnCantImportIntoServerLayer(GpxLayer.this);
     233                    return;
     234                }
    218235                String dir = Main.pref.get("markers.lastaudiodirectory");
    219236                JFileChooser fc = new JFileChooser(dir);
Note: See TracChangeset for help on using the changeset viewer.