Changeset 8934 in josm


Ignore:
Timestamp:
2015-10-23T21:26:47+02:00 (9 years ago)
Author:
Don-vip
Message:

see #11390 - rework update dialog

File:
1 edited

Legend:

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

    r8923 r8934  
    402402                        Main.parent,
    403403                        tr("Outdated Java version"),
    404                         new String[]{tr("Update Java"), tr("Cancel")});
     404                        new String[]{tr("OK"), tr("Update Java"), tr("Cancel")});
    405405                // Check if the dialog has not already been permanently hidden by user
    406406                if (!ed.toggleEnable("askUpdateJava8").toggleCheckState()) {
    407                     ed.setButtonIcons(new String[]{"java", "cancel"}).setCancelButton(2);
     407                    ed.setButtonIcons(new String[]{"ok", "java", "cancel"}).setCancelButton(3);
    408408                    ed.setMinimumSize(new Dimension(480, 300));
    409409                    ed.setIcon(JOptionPane.WARNING_MESSAGE);
    410                     String content = tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>";
     410                    StringBuilder content = new StringBuilder(tr("You are running version {0} of Java.", "<b>"+version+"</b>"))
     411                            .append("<br><br>");
    411412                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
    412                         content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
    413                                 "Oracle", tr("April 2015"))+"</b><br><br>";
    414                     }
    415                     content += "<b>" +
    416                             tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8")
    417                             + "</b><br><br>" +
    418                             tr("Would you like to update now ?");
    419                     ed.setContent(content);
    420 
    421                     if (ed.showDialog().getValue() == 1) {
     413                        content.append("<b>").append(tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
     414                                "Oracle", tr("April 2015"))).append("</b><br><br>");
     415                    }
     416                    content.append("<b>")
     417                           .append(tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8"))
     418                           .append("</b><br><br>")
     419                           .append(tr("Would you like to update now ?"));
     420                    ed.setContent(content.toString());
     421
     422                    if (ed.showDialog().getValue() == 2) {
    422423                        try {
    423424                            openUrl(url);
Note: See TracChangeset for help on using the changeset viewer.