Index: /trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 5109)
+++ /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 5110)
@@ -8,4 +8,5 @@
 
 import javax.swing.AbstractAction;
+import javax.swing.Icon;
 
 import org.openstreetmap.josm.Main;
@@ -52,4 +53,38 @@
 
     /**
+     * Constructs a {@code JosmAction}.
+     *
+     * @param name the action's text as displayed on the menu (if it is added to a menu)
+     * @param icon the icon to use
+     * @param tooltip  a longer description of the action that will be displayed in the tooltip. Please note
+     *           that html is not supported for menu actions on some platforms.
+     * @param shortcut a ready-created shortcut object or null if you don't want a shortcut. But you always
+     *            do want a shortcut, remember you can always register it with group=none, so you
+     *            won't be assigned a shortcut unless the user configures one. If you pass null here,
+     *            the user CANNOT configure a shortcut for your action.
+     * @param registerInToolbar register this action for the toolbar preferences?
+     * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null
+     * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
+     */
+    public JosmAction(String name, Icon icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+        super(name, icon);
+        setHelpId();
+        sc = shortcut;
+        if (sc != null) {
+            Main.registerActionShortcut(this, sc);
+        }
+        setTooltip(tooltip);
+        if (getValue("toolbar") == null) {
+            putValue("toolbar", toolbarId);
+        }
+        if (registerInToolbar) {
+            Main.toolbar.register(this);
+        }
+        if (installAdapters) {
+            installAdapters();
+        }
+    }
+
+    /**
      * The new super for all actions.
      *
@@ -69,20 +104,6 @@
      */
     public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, String toolbarId, boolean installAdapters) {
-        super(name, iconName == null ? null : ImageProvider.get(iconName));
-        setHelpId();
-        sc = shortcut;
-        if (sc != null) {
-            Main.registerActionShortcut(this, sc);
-        }
-        setTooltip(tooltip);
-        if (getValue("toolbar") == null) {
-            putValue("toolbar", toolbarId == null ? iconName : toolbarId);
-        }
-        if (register) {
-            Main.toolbar.register(this);
-        }
-        if (installAdapters) {
-            installAdapters();
-        }
+        this(name, iconName == null ? null : ImageProvider.get(iconName), tooltip, shortcut, register,
+                toolbarId == null ? iconName : toolbarId, installAdapters);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 5109)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 5110)
@@ -24,10 +24,6 @@
 
         public MapPaintAction(StyleSource style) {
-            super(style.getDisplayString(), style.icon,
-                    tr("Select the map painting styles"), null, style.icon != null);
-            if (style.icon == null) {
-                putValue("toolbar", "mappaint/" + style.getDisplayString());
-                Main.toolbar.register(this);
-            }
+            super(style.getDisplayString(), ImageProvider.getIfAvailable(style.icon),
+                    tr("Select the map painting styles"), null, true, "mappaint/" + style.getDisplayString(), true);
             this.button = new StayOpenCheckBoxMenuItem(this);
             this.style = style;
