Index: /trunk/src/org/openstreetmap/josm/gui/SideButton.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 744)
+++ /trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 744)
@@ -0,0 +1,52 @@
+package org.openstreetmap.josm.gui;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.xnap.commons.i18n.I18n.marktr;
+
+import java.awt.event.ActionListener;
+import java.awt.Insets;
+import javax.swing.Action;
+import javax.swing.JButton;
+
+import org.openstreetmap.josm.tools.ImageProvider;
+
+public class SideButton extends JButton {
+	public SideButton(Action action)
+	{
+		super(action);
+		doStyle();
+		setText(null);
+	}
+	public SideButton(String imagename, String property, String tooltip, ActionListener actionListener)
+	{
+		super(ImageProvider.get("dialogs", imagename));
+		doStyle();
+		setActionCommand(imagename);
+		addActionListener(actionListener);
+		setToolTipText(tooltip);
+	}
+	public SideButton(String name, String imagename, String property, String tooltip, int mnemonic, ActionListener actionListener)
+	{
+		super(tr(name), ImageProvider.get("dialogs", imagename));
+		setMnemonic(mnemonic);
+		setup(name, property, tooltip, actionListener);
+	}
+	public SideButton(String name, String imagename, String property, String tooltip, ActionListener actionListener)
+	{
+		super(tr(name), ImageProvider.get("dialogs", imagename));
+		setup(name, property, tooltip, actionListener);
+	}
+	private void setup(String name, String property, String tooltip, ActionListener actionListener)
+	{
+		doStyle();
+		setActionCommand(name);
+		addActionListener(actionListener);
+		setToolTipText(tooltip);
+		putClientProperty("help", "Dialog/"+property+"/"+name);
+	}
+	private void doStyle()
+	{
+		setMargin(new Insets(1,1,1,1));
+		setIconTextGap(2);
+	}
+}
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 744)
@@ -3,4 +3,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.xnap.commons.i18n.I18n.marktr;
 
 import java.awt.BorderLayout;
@@ -20,5 +21,4 @@
 
 import javax.swing.DefaultListModel;
-import javax.swing.JButton;
 import javax.swing.JList;
 import javax.swing.JOptionPane;
@@ -43,5 +43,5 @@
 import org.openstreetmap.josm.gui.NavigatableComponent;
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
-import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.gui.SideButton;
 
 public final class ConflictDialog extends ToggleDialog {
@@ -64,17 +64,13 @@
 
 		JPanel buttonPanel = new JPanel(new GridLayout(1,2));
-		JButton button = new JButton(tr("Resolve"), ImageProvider.get("dialogs", "conflict"));
-		button.setToolTipText(tr("Open a merge dialog of all selected items in the list above."));
-		button.addActionListener(new ActionListener(){
+		buttonPanel.add(new SideButton(marktr("Resolve"), "conflict", "Conflict",
+		tr("Open a merge dialog of all selected items in the list above."), new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				resolve();
 			}
-		});
-		button.putClientProperty("help", "Dialog/Conflict/Resolve");
-		buttonPanel.add(button);
+		}));
 
-		button = new JButton(tr("Select"), ImageProvider.get("mapmode/selection/select"));
-		button.setToolTipText(tr("Set the selected elements on the map to the selected items in the list above."));
-		button.addActionListener(new ActionListener(){
+		buttonPanel.add(new SideButton(marktr("Select"), "select", "Conflict",
+		tr("Set the selected elements on the map to the selected items in the list above."), new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>();
@@ -83,8 +79,5 @@
 				Main.ds.setSelected(sel);
 			}
-		});
-		button.putClientProperty("help", "Dialog/Conflict/Select");
-		buttonPanel.add(button);
-
+		}));
 		add(buttonPanel, BorderLayout.SOUTH);
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java	(revision 744)
@@ -3,4 +3,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.xnap.commons.i18n.I18n.marktr;
 
 import java.awt.BorderLayout;
@@ -20,5 +21,4 @@
 import java.util.TreeSet;
 
-import javax.swing.JButton;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
@@ -35,4 +35,5 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -84,6 +85,4 @@
 	private Map<OsmPrimitive, List<HistoryItem>> cache = new HashMap<OsmPrimitive, List<HistoryItem>>();
 	private JLabel notLoaded = new JLabel("<html><i>"+tr("Click Reload to refresh list")+"</i></html>");
-	private JButton reloadButton = new JButton(tr("Reload"), ImageProvider.get("dialogs/refresh"));
-	private JButton revertButton = new JButton(tr("Revert"), ImageProvider.get("dialogs/revert"));
 
 	public HistoryDialog() {
@@ -124,24 +123,18 @@
 
 		JPanel buttons = new JPanel(new GridLayout(1,2));
-		buttons.add(reloadButton);
-		buttons.add(revertButton);
-		add(buttons, BorderLayout.SOUTH);
-
-		reloadButton.addActionListener(new ActionListener(){
+		buttons.add(new SideButton(marktr("Reload"), "refresh", "History", tr("Reload all currently selected objects and refresh the list."),
+		new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				reload();
 			}
-		});
-		reloadButton.setToolTipText(tr("Reload all currently selected objects and refresh the list."));
-		reloadButton.putClientProperty("help", "Dialog/History/Reload");
-		
-		revertButton.addActionListener(new ActionListener(){
+		}));
+		buttons.add(new SideButton(marktr("Revert"), "revert", "History",
+		tr("Revert the state of all currently selected objects to the version selected in the history list."), new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				JOptionPane.showMessageDialog(Main.parent, tr("Not implemented yet."));
 			}
-		});
-		revertButton.setToolTipText(tr("Revert the state of all currently selected objects to the version selected in the history list."));
-		revertButton.putClientProperty("help", "Dialog/History/Revert");
-		
+		}));
+		add(buttons, BorderLayout.SOUTH);
+
 		DataSet.selListeners.add(this);
 	}
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 744)
@@ -20,5 +20,4 @@
 import javax.swing.DefaultListModel;
 import javax.swing.Icon;
-import javax.swing.JButton;
 import javax.swing.JLabel;
 import javax.swing.JList;
@@ -33,4 +32,5 @@
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
@@ -126,13 +126,13 @@
 	 * item below are editable datasets and the merge button is clicked.
 	 */
-	private final JButton mergeButton = new JButton(ImageProvider.get("dialogs", "mergedown"));
+	private final SideButton mergeButton;
 	/**
 	 * Button for moving layer up.
 	 */
-	private JButton upButton = new JButton(ImageProvider.get("dialogs", "up"));
+	private final SideButton upButton;
 	/**
 	 * Button for moving layer down.
 	 */
-	private JButton downButton = new JButton(ImageProvider.get("dialogs", "down"));
+	private final SideButton downButton;
 	/**
 	 * Button for delete layer.
@@ -231,26 +231,15 @@
 		};
 
-		upButton.setToolTipText(tr("Move the selected layer one row up."));
-		upButton.addActionListener(upDown);
-		upButton.setActionCommand("up");
-		upButton.putClientProperty("help", "Dialog/LayerList/Up");
+		upButton = new SideButton("up", "LayerList", tr("Move the selected layer one row up."), upDown);
 		buttonPanel.add(upButton);
 
-		downButton.setToolTipText(tr("Move the selected layer one row down."));
-		downButton.addActionListener(upDown);
-		downButton.setActionCommand("down");
-		downButton.putClientProperty("help", "Dialog/LayerList/Down");
+ 		downButton = new SideButton("down", "LayerList", tr("Move the selected layer one row down."), upDown);
 		buttonPanel.add(downButton);
 
-		JButton showHideButton = new JButton(new ShowHideLayerAction(null));
-		showHideButton.setText("");
-		buttonPanel.add(showHideButton);
-
-		JButton deleteButton = new JButton(deleteAction);
-		deleteButton.setText("");
-		buttonPanel.add(deleteButton);
-
-		mergeButton.setToolTipText(tr("Merge the layer directly below into the selected layer."));
-		mergeButton.addActionListener(new ActionListener(){
+		buttonPanel.add(new SideButton(new ShowHideLayerAction(null)));
+		buttonPanel.add(new SideButton(deleteAction));
+
+		mergeButton = new SideButton("Merge", "mergedown", "LayerList", tr("Merge the layer directly below into the selected layer."),
+		new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				Layer lTo = (Layer)instance.getSelectedValue();
@@ -262,5 +251,5 @@
 			}
 		});
-		mergeButton.putClientProperty("help", "Dialog/LayerList/Merge");
+		mergeButton.setText(null);
 		buttonPanel.add(mergeButton);
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 744)
@@ -31,5 +31,4 @@
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.DefaultListCellRenderer;
-import javax.swing.JButton;
 import javax.swing.JComboBox;
 import javax.swing.JDialog;
@@ -61,7 +60,7 @@
 import org.openstreetmap.josm.gui.tagging.TaggingCellRenderer;
 import org.openstreetmap.josm.gui.tagging.TaggingPreset;
+import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.tools.AutoCompleteComboBox;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.ImageProvider;
 
 /**
@@ -564,20 +563,10 @@
 		};
 		
-		buttonPanel.add(createButton(marktr("Add"),tr("Add a new key/value pair to all objects"), KeyEvent.VK_A, buttonAction));
-		buttonPanel.add(createButton(marktr("Edit"),tr( "Edit the value of the selected key for all objects"), KeyEvent.VK_E, buttonAction));
-		buttonPanel.add(createButton(marktr("Delete"),tr("Delete the selected key in all objects"), KeyEvent.VK_D, buttonAction));
+		buttonPanel.add(new SideButton(marktr("Add"),"add","Properties",tr("Add a new key/value pair to all objects"), KeyEvent.VK_A, buttonAction));
+		buttonPanel.add(new SideButton(marktr("Edit"),"edit","Properties",tr("Edit the value of the selected key for all objects"), KeyEvent.VK_E, buttonAction));
+		buttonPanel.add(new SideButton(marktr("Delete"),"delete","Properties",tr("Delete the selected key in all objects"), KeyEvent.VK_D, buttonAction));
 		add(buttonPanel, BorderLayout.SOUTH);
 
 		DataSet.selListeners.add(this);
-	}
-
-	private JButton createButton(String name, String tooltip, int mnemonic, ActionListener actionListener) {
-		JButton b = new JButton(tr(name), ImageProvider.get("dialogs", name.toLowerCase()));
-		b.setActionCommand(name);
-		b.addActionListener(actionListener);
-		b.setToolTipText(tooltip);
-		b.setMnemonic(mnemonic);
-		b.putClientProperty("help", "Dialog/Properties/"+name);
-		return b;
 	}
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 744)
@@ -5,5 +5,5 @@
 
 import java.awt.BorderLayout;
-import java.awt.GridBagLayout;
+import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -14,5 +14,4 @@
 
 import javax.swing.DefaultListModel;
-import javax.swing.JButton;
 import javax.swing.JList;
 import javax.swing.JPanel;
@@ -24,4 +23,5 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
+import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.layer.DataChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -29,5 +29,4 @@
 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.ImageProvider;
 
 /**
@@ -68,7 +67,7 @@
 		add(new JScrollPane(displaylist), BorderLayout.CENTER);
 
-		JPanel buttonPanel = new JPanel(new GridBagLayout());
+		JPanel buttonPanel = new JPanel(new GridLayout(1,4));
 		
-		buttonPanel.add(createButton(marktr("New"), "addrelation", tr("Create a new relation"), -1, new ActionListener() {
+		buttonPanel.add(new SideButton(marktr("New"), "addrelation", "Selection", tr("Create a new relation"), new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				// call relation editor with null argument to create new relation
@@ -77,5 +76,5 @@
 		}), GBC.std());
 		
-		buttonPanel.add(createButton(marktr("Select"), "select", tr("Select this relation"), -1, new ActionListener() {
+		buttonPanel.add(new SideButton(marktr("Select"), "select", "Selection", tr("Select this relation"), new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				// replace selection with the relation from the list
@@ -84,5 +83,5 @@
 		}), GBC.std());
 		
-		buttonPanel.add(createButton(marktr("Edit"), "edit", tr( "Open an editor for the selected relation"), -1, new ActionListener() {
+		buttonPanel.add(new SideButton(marktr("Edit"), "edit", "Selection", tr( "Open an editor for the selected relation"), new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				Relation toEdit = (Relation) displaylist.getSelectedValue();
@@ -92,5 +91,5 @@
 		}), GBC.std());
 		
-		buttonPanel.add(createButton(" ", "delete", tr("Delete the selected relation"), -1, new ActionListener() {
+		buttonPanel.add(new SideButton(marktr("Delete"), "delete", "Selection", tr("Delete the selected relation"), new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
 				Relation toDelete = (Relation) displaylist.getSelectedValue();
@@ -103,14 +102,4 @@
 		Layer.listeners.add(this);
 		add(buttonPanel, BorderLayout.SOUTH);
-	}
-
-	private JButton createButton(String name, String imagename, String tooltip, int mnemonic, ActionListener actionListener) {
-		JButton b = new JButton(tr(name), ImageProvider.get("dialogs", imagename));
-		b.setActionCommand(name);
-		b.addActionListener(actionListener);
-		b.setToolTipText(tooltip);
-		if (mnemonic >= 0) b.setMnemonic(mnemonic);
-		b.putClientProperty("help", "Dialog/Properties/"+name);
-		return b;
 	}
 
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 743)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 744)
@@ -3,4 +3,5 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.xnap.commons.i18n.I18n.marktr;
 
 import java.awt.BorderLayout;
@@ -16,5 +17,4 @@
 
 import javax.swing.DefaultListModel;
-import javax.swing.JButton;
 import javax.swing.JList;
 import javax.swing.JPanel;
@@ -27,5 +27,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
-import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.gui.SideButton;
 
 /**
@@ -63,5 +63,6 @@
 		JPanel buttonPanel = new JPanel(new GridLayout(1,2));
 
-		buttonPanel.add(createButton("Select", "mapmode/selection/select", "Set the selected elements on the map to the selected items in the list above.", new ActionListener(){
+		buttonPanel.add(new SideButton(marktr("Select"), "select", "SelectionList",
+		tr("Set the selected elements on the map to the selected items in the list above."), new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				updateMap();
@@ -69,5 +70,5 @@
 		}));
 
-		buttonPanel.add(createButton("Reload", "dialogs/refresh", "Refresh the selection list.", new ActionListener(){
+		buttonPanel.add(new SideButton(marktr("Reload"), "refresh", "SelectionList", tr("Refresh the selection list."), new ActionListener(){
 			public void actionPerformed(ActionEvent e) {
 				selectionChanged(Main.ds.getSelected());
@@ -75,5 +76,5 @@
 		}));
 
-		buttonPanel.add(createButton("Search", "dialogs/search", "Search for objects.", Main.main.menu.search));
+		buttonPanel.add(new SideButton(marktr("Search"), "search", "SelectionList", tr("Search for objects."), Main.main.menu.search));
 
 		add(buttonPanel, BorderLayout.SOUTH);
@@ -81,12 +82,4 @@
 
 		DataSet.selListeners.add(this);
-	}
-
-	private JButton createButton(String name, String icon, String tooltip, ActionListener action) {
-		JButton button = new JButton(tr(name), ImageProvider.get(icon));
-		button.setToolTipText(tr(tooltip));
-		button.addActionListener(action);
-		button.putClientProperty("help", "Dialog/SelectionList/"+name);
-		return button;
 	}
 
