Changeset 4434 in josm for trunk/src


Ignore:
Timestamp:
2011-09-17T12:29:55+02:00 (13 years ago)
Author:
stoecker
Message:

fix #6850 - patch by Don-Vip - ask only once for EULA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/ImageryPreference.java

    r4433 r4434  
    2121import java.util.ArrayList;
    2222import java.util.HashMap;
     23import java.util.HashSet;
    2324import java.util.List;
    2425import java.util.Locale;
    2526import java.util.Map;
     27import java.util.Set;
     28
    2629import javax.swing.AbstractAction;
    2730import javax.swing.BorderFactory;
     
    663666                    return;
    664667                }
     668               
     669                Set<String> acceptedEulas = new HashSet<String>();
    665670
    666671                outer: for (int i = 0; i < lines.length; i++) {
     
    679684                    }
    680685
    681                     if (info.getEulaAcceptanceRequired() != null) {
    682                         if (!confirmEulaAcceptance(gui, info.getEulaAcceptanceRequired())) {
     686                    String eulaURL = info.getEulaAcceptanceRequired();
     687                    // If set and not already accepted, ask for EULA acceptance
     688                    if (eulaURL != null && !acceptedEulas.contains(eulaURL)) {
     689                        if (confirmEulaAcceptance(gui, eulaURL)) {
     690                            acceptedEulas.add(eulaURL);
     691                        } else {
    683692                            continue outer;
    684693                        }
Note: See TracChangeset for help on using the changeset viewer.