Index: gtk/gtkactiongroup.c
===================================================================
--- gtk/gtkactiongroup.c	(revision 17541)
+++ gtk/gtkactiongroup.c	(working copy)
@@ -535,6 +535,24 @@
     (action_group, action_name);
 }
 
+static gboolean
+_is_unique(GtkActionGroup *action_group,
+	   const gchar    *action_name)
+{
+  g_assert(action_group != NULL);
+  g_assert(action_name != NULL);
+  
+  if (gtk_action_group_get_action (action_group, action_name) != NULL)
+    {
+      g_warning("Refusing to add non-unique action '%s' to action group '%s'",
+		action_name,
+		action_group->private_data->name);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
 /**
  * gtk_action_group_add_action:
  * @action_group: the action group
@@ -556,6 +574,9 @@
   g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
   g_return_if_fail (GTK_IS_ACTION (action));
   g_return_if_fail (gtk_action_get_name (action) != NULL);
+  
+  if (!_is_unique(action_group, gtk_action_get_name (action)))
+      return;
 
   g_hash_table_insert (action_group->private_data->actions, 
 		       g_strdup (gtk_action_get_name (action)),
@@ -592,6 +613,9 @@
   GtkStockItem stock_item;
   gchar *name;
   gchar *stock_id;
+
+  if (!_is_unique(action_group, gtk_action_get_name (action)))
+      return;
   
   g_object_get (action, "name", &name, "stock-id", &stock_id, NULL);
 
@@ -773,6 +797,9 @@
       const gchar *label;
       const gchar *tooltip;
 
+      if (!_is_unique(action_group, entries[i].name))
+        return;
+
       label = gtk_action_group_translate_string (action_group, entries[i].label);
       tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip);
 
@@ -877,6 +904,9 @@
       const gchar *label;
       const gchar *tooltip;
 
+      if (!_is_unique(action_group, entries[i].name))
+        return;
+
       label = gtk_action_group_translate_string (action_group, entries[i].label);
       tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip);
 
@@ -989,6 +1019,9 @@
       const gchar *label;
       const gchar *tooltip; 
 
+      if (!_is_unique(action_group, entries[i].name))
+        return;
+
       label = gtk_action_group_translate_string (action_group, entries[i].label);
       tooltip = gtk_action_group_translate_string (action_group, entries[i].tooltip);
 
Index: tests/testactions.c
===================================================================
--- tests/testactions.c	(revision 17541)
+++ tests/testactions.c	(working copy)
@@ -141,6 +141,8 @@
   { "toolbar-small-icons", NULL, "Small Icons", NULL, 
     NULL, G_CALLBACK (toolbar_size_small) },
   { "toolbar-large-icons", NULL, "Large Icons", NULL,
+    NULL, G_CALLBACK (toolbar_size_large) },
+  { "toolbar-large-icons", NULL, "Duplicate item, should be ignored", NULL,
     NULL, G_CALLBACK (toolbar_size_large) }
 };
 static guint n_entries = G_N_ELEMENTS (entries);
@@ -152,6 +154,9 @@
   { "toggle-cnp", NULL, "Enable Cut/Copy/Paste", NULL,
     "Change the sensitivity of the cut, copy and paste actions",
     G_CALLBACK (toggle_cnp_actions), TRUE },
+  { "toggle-cnp", NULL, "Duplicate item, should be ignored", NULL,
+    "Duplicate item, should be ignored",
+    G_CALLBACK (toggle_cnp_actions), TRUE },
 };
 static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
 
@@ -170,7 +175,9 @@
   { "justify-right", GTK_STOCK_JUSTIFY_RIGHT, "_Right", "<control>R",
     "Right justify the text", JUSTIFY_RIGHT },
   { "justify-fill", GTK_STOCK_JUSTIFY_FILL, "_Fill", "<control>J",
-    "Fill justify the text", JUSTIFY_FILL }
+    "Fill justify the text", JUSTIFY_FILL },
+  { "justify-fill", GTK_STOCK_JUSTIFY_FILL, "_Duplicate", "<control>J",
+    "Duplicate entry, should be ignored", JUSTIFY_FILL }
 };
 static guint n_justify_entries = G_N_ELEMENTS (justify_entries);
 
