Ignore:
Timestamp:
2016-02-10T21:33:50+01:00 (4 years ago)
Author:
Don-vip
Message:

add more unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java

    r9146 r9779  
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
     6import java.awt.GraphicsEnvironment;
    67import java.io.IOException;
    78import java.net.URL;
     
    377378        else
    378379            msg = tr(msg);
    379         JOptionPane.showMessageDialog(Main.parent,
    380                 "<html><p>" + msg + "</p></html>",
    381                 tr("Error playing sound"), JOptionPane.ERROR_MESSAGE);
     380        Main.error(msg);
     381        if (!GraphicsEnvironment.isHeadless()) {
     382            JOptionPane.showMessageDialog(Main.parent,
     383                    "<html><p>" + msg + "</p></html>",
     384                    tr("Error playing sound"), JOptionPane.ERROR_MESSAGE);
     385        }
    382386    }
    383387}
Note: See TracChangeset for help on using the changeset viewer.