Changeset 5366 in josm
- Timestamp:
- 2012-07-25T20:45:18+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r5266 r5366 10 10 import java.util.Set; 11 11 12 import javax.swing.JOptionPane; 12 13 import javax.swing.SwingUtilities; 13 14 15 import org.openstreetmap.josm.Main; 14 16 import org.openstreetmap.josm.data.osm.Changeset; 15 17 import org.openstreetmap.josm.data.osm.ChangesetCache; … … 18 20 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 19 21 import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetDownloadTask; 22 import org.openstreetmap.josm.gui.util.GuiHelper; 20 23 import org.openstreetmap.josm.io.ChangesetQuery; 21 24 import org.openstreetmap.josm.io.OsmServerChangesetReader; … … 93 96 if (canceled) return; 94 97 if (lastException != null) { 95 ExceptionUtil.explainException(lastException); 98 GuiHelper.runInEDTAndWait(new Runnable() { 99 private final Component parent = progressMonitor != null ? progressMonitor.getWindowParent() : null; 100 @Override 101 public void run() { 102 JOptionPane.showMessageDialog( 103 parent != null ? parent : Main.parent, 104 ExceptionUtil.explainException(lastException), 105 tr("Errors during download"), 106 JOptionPane.ERROR_MESSAGE); 107 } 108 }); 96 109 return; 97 110 } -
trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
r5266 r5366 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.io.UnsupportedEncodingException; 7 import java.net.URLEncoder; 6 8 import java.text.DateFormat; 7 9 import java.text.MessageFormat; … … 233 235 sb.append("user").append("=").append(uid); 234 236 } else if (userName != null) { 235 sb.append("display_name").append("=").append(userName); 237 try { 238 sb.append("display_name").append("=").append(URLEncoder.encode(userName, "UTF-8")); 239 } catch (UnsupportedEncodingException e) { 240 e.printStackTrace(); 241 } 236 242 } 237 243 if (bounds != null) { … … 268 274 } 269 275 return sb.toString(); 276 } 277 278 @Override 279 public String toString() { 280 return getQueryString(); 270 281 } 271 282
Note:
See TracChangeset
for help on using the changeset viewer.