Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2141)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 2142)
@@ -45,16 +45,4 @@
 
         bookmarks = new BookmarkList();
-
-        /* add a handler for "double click" mouse events */
-        MouseListener mouseListener = new MouseAdapter() {
-            @Override public void mouseClicked(MouseEvent e) {
-                if (e.getClickCount() == 2) {
-                    //int index = bookmarks.locationToIndex(e.getPoint());
-                    gui.closeDownloadDialog(true);
-                }
-            }
-        };
-        bookmarks.addMouseListener(mouseListener);
-
         bookmarks.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
             public void valueChanged(ListSelectionEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 2141)
+++ trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 2142)
@@ -81,14 +81,4 @@
         }
 
-        KeyListener osmUrlKeyListener = new KeyListener() {
-            public void keyPressed(KeyEvent keyEvent) {}
-            public void keyReleased(KeyEvent keyEvent) {
-                if (keyEvent.getKeyCode() == KeyEvent.VK_ENTER && parseURL(gui))
-                    gui.closeDownloadDialog(true);
-            }
-            public void keyTyped(KeyEvent keyEvent) {}
-        };
-
-        osmUrl.addKeyListener(osmUrlKeyListener);
         osmUrl.getDocument().addDocumentListener(new osmUrlRefresher());
 
@@ -99,7 +89,7 @@
             @Override public void focusGained(FocusEvent e) {
                 SwingUtilities.invokeLater(new Runnable() {
-                        public void run() {
-                            osmUrl.selectAll();
-                        }
+                    public void run() {
+                        osmUrl.selectAll();
+                    }
                 });
             }
@@ -123,5 +113,5 @@
         showUrl.setBackground(dlg.getBackground());
         showUrl.addFocusListener(new FocusAdapter(){
-           @Override
+            @Override
             public void focusGained(FocusEvent e) {
                 showUrl.selectAll();
@@ -158,11 +148,12 @@
         latlon[2].setText(Double.toString(gui.maxlat));
         latlon[3].setText(Double.toString(gui.maxlon));
-        for (JTextField f : latlon)
+        for (JTextField f : latlon) {
             f.setCaretPosition(0);
+        }
     }
 
     private void updateUrl(DownloadDialog gui) {
         showUrl.setText(OsmUrlToBounds.getURL(new Bounds(
-        new LatLon(gui.minlat, gui.minlon), new LatLon(gui.maxlat, gui.maxlon))));
+                new LatLon(gui.minlat, gui.minlon), new LatLon(gui.maxlat, gui.maxlon))));
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 2141)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 2142)
@@ -19,5 +19,4 @@
 import javax.swing.JCheckBox;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
@@ -47,7 +46,4 @@
 public class DownloadDialog extends JPanel {
 
-    // the JOptionPane that contains this dialog. required for the closeDialog() method.
-    private JOptionPane optionPane;
-
     public interface DownloadTask {
         /**
@@ -179,5 +175,5 @@
 
         getInputMap(WHEN_IN_FOCUSED_WINDOW).put(
-        KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK), "checkClipboardContents");
+                KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_MASK), "checkClipboardContents");
 
         getActionMap().put("checkClipboardContents", new AbstractAction() {
@@ -231,5 +227,7 @@
     public void boundingBoxChanged(DownloadSelection eventSource) {
         for (DownloadSelection s : downloadSelections) {
-            if (s != eventSource) s.boundingBoxChanged(this);
+            if (s != eventSource) {
+                s.boundingBoxChanged(this);
+            }
         }
         updateSizeCheck();
@@ -242,21 +240,3 @@
         return tabpane.getSelectedIndex();
     }
-
-    /**
-     * Closes the download dialog. This is intended to be called by one of
-     * the various download area selection "plugins".
-     *
-     * @param download true to download selected data, false to cancel download
-     */
-    public void closeDownloadDialog(boolean download) {
-        optionPane.setValue(download ? JOptionPane.OK_OPTION : JOptionPane.CANCEL_OPTION);
-    }
-
-    /**
-     * Has to be called after this dialog has been added to a JOptionPane.
-     * @param optionPane
-     */
-    public void setOptionPane(JOptionPane optionPane) {
-        this.optionPane = optionPane;
-    }
 }
