Ignore:
Timestamp:
2014-09-05T01:50:02+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #10480 - False positive with lanes validation if source:lanes is present + fix headless exception seen in unit tests

File:
1 edited

Legend:

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

    r7402 r7497  
    2828import static org.openstreetmap.josm.tools.I18n.tr;
    2929
     30import java.awt.GraphicsEnvironment;
    3031import java.io.File;
    3132import java.io.IOException;
     
    265266            return false;
    266267        }
    267         // JOSM certificate not found, warn user
    268         StringBuilder message = new StringBuilder("<html>");
    269         message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+
    270                 "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+
    271                 "You are now going to be prompted by Windows to confirm this operation.<br>"+
    272                 "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+
    273                 "If unsure, you can also click No then disable HTTPS support in Remote Control preferences."));
    274         message.append("</html>");
    275         JOptionPane.showMessageDialog(Main.parent, message.toString(),
    276                 tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE);
     268        if (!GraphicsEnvironment.isHeadless()) {
     269            // JOSM certificate not found, warn user
     270            StringBuilder message = new StringBuilder("<html>");
     271            message.append(tr("Remote Control is configured to provide HTTPS support.<br>"+
     272                    "This requires to add a custom certificate generated by JOSM to the Windows Root CA store.<br><br>"+
     273                    "You are now going to be prompted by Windows to confirm this operation.<br>"+
     274                    "To enable proper HTTPS support, <b>please click Yes</b> in next dialog.<br><br>"+
     275                    "If unsure, you can also click No then disable HTTPS support in Remote Control preferences."));
     276            message.append("</html>");
     277            JOptionPane.showMessageDialog(Main.parent, message.toString(),
     278                    tr("HTTPS support in Remote Control"), JOptionPane.INFORMATION_MESSAGE);
     279        }
    277280        // install it to Windows-ROOT keystore, used by IE, Chrome and Safari, but not by Firefox
    278281        Main.info(tr("Adding JOSM localhost certificate to {0} keystore", WINDOWS_ROOT));
Note: See TracChangeset for help on using the changeset viewer.