Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 3597)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 3598)
@@ -1,9 +1,13 @@
 // License: GPL. See LICENSE file for details.
-
 package org.openstreetmap.josm.gui;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.BorderLayout;
 import java.awt.Container;
 import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseWheelEvent;
@@ -15,10 +19,14 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import javax.swing.AbstractAction;
 import javax.swing.AbstractButton;
 import javax.swing.Action;
 import javax.swing.BoxLayout;
 import javax.swing.ButtonGroup;
+import javax.swing.JButton;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
 import javax.swing.JSplitPane;
 import javax.swing.JToolBar;
@@ -49,4 +57,5 @@
 import org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
 import org.openstreetmap.josm.tools.Destroyable;
 
@@ -92,4 +101,6 @@
 
     public final ButtonGroup toolGroup = new ButtonGroup();
+
+    public final JButton otherButton = new JButton(new OtherButtonsAction());
 
     /**
@@ -201,12 +212,14 @@
         MapView.removeLayerChangeListener(this);
         dialogsPanel.destroy();
-        for (int i = 0; i < toolBarActions.getComponentCount(); ++i)
+        for (int i = 0; i < toolBarActions.getComponentCount(); ++i) {
             if (toolBarActions.getComponent(i) instanceof Destroyable) {
                 ((Destroyable)toolBarActions.getComponent(i)).destroy();
             }
-        for (int i = 0; i < toolBarToggle.getComponentCount(); ++i)
+        }
+        for (int i = 0; i < toolBarToggle.getComponentCount(); ++i) {
             if (toolBarToggle.getComponent(i) instanceof Destroyable) {
                 ((Destroyable)toolBarToggle.getComponent(i)).destroy();
             }
+        }
 
         // remove menu entries
@@ -240,7 +253,23 @@
      * @param dlg The toggle dialog. It must not be in the list already.
      */
-    public IconToggleButton addToggleDialog(ToggleDialog dlg) {
-        IconToggleButton button = new IconToggleButton(dlg.getToggleAction());
+    public IconToggleButton addToggleDialog(final ToggleDialog dlg) {
+        final IconToggleButton button = new IconToggleButton(dlg.getToggleAction());
         toolBarToggle.add(button);
+        button.addMouseListener(new PopupMenuLauncher(new JPopupMenu() {
+            {
+                add(new AbstractAction() {
+                    {
+                        putValue(NAME, tr("Hide this button"));
+                        putValue(SHORT_DESCRIPTION, tr("Click the arrow at the bottom to show it again."));
+                    }
+
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        dlg.hideButton();
+                    }
+                });
+            }
+        }));
+        dlg.setButton(button);
         allDialogs.add(dlg);
         if (dialogsPanel.initialized) {
@@ -298,7 +327,15 @@
         JToolBar jb = new JToolBar(JToolBar.VERTICAL);
         jb.setFloatable(false);
+        toolBarActions.setAlignmentX(0.5f);
         jb.add(toolBarActions);
+
         jb.addSeparator(new Dimension(0,10));
+        toolBarToggle.setAlignmentX(0.5f);
         jb.add(toolBarToggle);
+        otherButton.setAlignmentX(0.5f);
+        otherButton.setBorder(null);
+        otherButton.setFont(otherButton.getFont().deriveFont(Font.PLAIN));
+        jb.add(otherButton);
+
         if(Main.pref.getBoolean("sidetoolbar.visible", true))
         {
@@ -317,4 +354,36 @@
         if (statusLine != null && Main.pref.getBoolean("statusline.visible", true)) {
             panel.add(statusLine, BorderLayout.SOUTH);
+        }
+    }
+
+    class OtherButtonsAction extends AbstractAction {
+
+        public OtherButtonsAction() {
+            putValue(NAME, ">>");
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            JPopupMenu menu = new JPopupMenu();
+            for (final ToggleDialog t : allDialogs) {
+                menu.add(new JCheckBoxMenuItem(new AbstractAction() {
+                    {
+                        putValue(NAME, t.getToggleAction().getValue(NAME));
+                        putValue(SMALL_ICON, t.getToggleAction().getValue(SMALL_ICON));
+                        putValue(SELECTED_KEY, !t.isButtonHidden());
+                        putValue(SHORT_DESCRIPTION, tr("Hide or show this toggle button"));
+                    }
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        if ((Boolean) getValue(SELECTED_KEY)) {
+                            t.showButton();
+                        } else {
+                            t.hideButton();
+                        }
+                    }
+                }));
+            }
+            Rectangle bounds = otherButton.getBounds();
+            menu.show(otherButton, bounds.x+bounds.width, 0);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 3597)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 3598)
@@ -31,4 +31,5 @@
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.JToggleButton;
 
 import org.openstreetmap.josm.Main;
@@ -82,4 +83,7 @@
     protected JDialog detachedDialog;
 
+    protected JToggleButton button;
+    protected boolean buttonHidden;
+
     /**
      * Constructor
@@ -125,4 +129,6 @@
         isDocked = Main.pref.getBoolean(preferencePrefix+".docked", true);
         isCollapsed = Main.pref.getBoolean(preferencePrefix+".minimized", false);
+
+        buttonHidden = Main.pref.getBoolean(preferencePrefix+".button_hidden", false);
 
         RedirectInputMap.redirectToMainContentPane(this);
@@ -187,9 +193,8 @@
 
     /**
-     * Changes the state of the dialog such that the user can see the content
-     * and takes care of the panel reconstruction.
-     */
-    public void unfurlDialog()
-    {
+     * Changes the state of the dialog such that the user can see the content.
+     * (takes care of the panel reconstruction)
+     */
+    public void unfurlDialog() {
         if (isDialogInDefaultView())
             return;
@@ -198,4 +203,7 @@
             dialogsPanel.reconstruct(Action.COLLAPSED_TO_DEFAULT, this);
         } else if (!isDialogShowing()) {
+            if (isButtonHidden()) {
+                showButtonImpl();
+            }
             showDialog();
             if (isDocked && isCollapsed) {
@@ -207,4 +215,26 @@
             showNotify();
         }
+    }
+
+    public void hideButton() {
+        if (!button.isVisible())
+            throw new AssertionError();
+        if ((Boolean) toggleAction.getValue("selected")) {
+            toggleAction.actionPerformed(null);
+        }
+        button.setVisible(false);
+        setButtonHidden(true);
+    }
+
+    public void showButton() {
+        showButtonImpl();
+        unfurlDialog();
+    }
+
+    protected void showButtonImpl() {
+        if (button.isVisible())
+            throw new AssertionError();
+        button.setVisible(true);
+        setButtonHidden(false);
     }
 
@@ -569,4 +599,23 @@
     }
 
+    public boolean isButtonHidden() {
+        return buttonHidden;
+    }
+
+    protected void setButtonHidden(boolean buttonHidden) {
+        this.buttonHidden = buttonHidden;
+        Main.pref.put(preferencePrefix+".button_hidden", buttonHidden);
+    }
+
+
+    public void setButton(JToggleButton button) {
+        this.button = button;
+        button.setVisible(!buttonHidden);
+    }
+
+    public JToggleButton getButton() {
+        return button;
+    }
+
     /***
      * The following methods are intended to be overridden, in order to customize
