- Timestamp:
- 2009-10-03T14:17:06+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r2044 r2233 77 77 } 78 78 79 protected boolean confirmLaunchMultiple(int numPrimitives) { 80 String msg = tr( 81 "You''re about to launch {0} browser windows.<br>" 82 + "This may both clutter your screen with browser windows<br>" 83 + "and take some time to finish.", numPrimitives); 84 msg = "<html>" + msg + "</html>"; 85 String [] options = new String [] { 86 tr("Continue"), 87 tr("Cancel") 88 }; 89 int ret = JOptionPane.showOptionDialog( 90 Main.parent, 91 msg, 92 tr("Warning"), 93 JOptionPane.YES_NO_OPTION, 94 JOptionPane.WARNING_MESSAGE, 95 null, 96 options, 97 options[0] 98 ); 99 return ret == JOptionPane.YES_OPTION; 100 } 101 79 102 protected void launchInfoBrowsersForSelectedPrimitives() { 80 103 ArrayList<OsmPrimitive> primitivesToShow = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected()); … … 102 125 // 103 126 int max = Math.min(10, primitivesToShow.size()); 104 if (max < primitivesToShow.size()) { 105 System.out.println(tr("WARNING: launching browser windows for the first {0} of {1} selected primitives only", 10, primitivesToShow.size())); 106 } 127 if (primitivesToShow.size() > max && ! confirmLaunchMultiple(primitivesToShow.size())) 128 return; 107 129 for(int i = 0; i < max; i++) { 108 130 launchBrowser(createInfoUrl(primitivesToShow.get(i)));
Note:
See TracChangeset
for help on using the changeset viewer.