diff --git a/ChangeLog b/ChangeLog
index ba17adf1cc1419c526c15498f4e656204ba29132..3b0098eeacf13a14e3ff6ac8952b2a8f9fe904d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-11	Benedikt Meurer <benny@xfce.org>
+
+	* thunar/thunar-standard-view.c: Sort the extension actions by their
+	  labels prior to adding them to the UI manager.
+
 2005-09-11	Benedikt Meurer <benny@xfce.org>
 
 	* examples/open-terminal-here/open-terminal-here.c
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 77b6bd9d812302ead51dff92e0182cb8a013633c..a72b7a31510429c203023bc897d4c3004e9021b9 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -1062,6 +1062,34 @@ thunar_standard_view_get_selected_uris (ThunarStandardView *standard_view)
 
 
 
+static gint
+compare_actions (gconstpointer a,
+                 gconstpointer b)
+{
+  gchar *label_a;
+  gchar *label_b;
+  gint   result;
+
+  g_object_get (G_OBJECT (a), "label", &label_a, NULL);
+  g_object_get (G_OBJECT (b), "label", &label_b, NULL);
+
+  if (G_UNLIKELY (label_a == NULL && label_b == NULL))
+    result = 0;
+  else if (G_UNLIKELY (label_a == NULL))
+    result = -1;
+  else if (G_UNLIKELY (label_b == NULL))
+    result = 1;
+  else
+    result = g_utf8_collate (label_a, label_b);
+
+  g_free (label_b);
+  g_free (label_a);
+
+  return result;
+}
+
+
+
 static void
 thunar_standard_view_merge_menu_extensions (ThunarStandardView *standard_view,
                                             GList              *selected_items)
@@ -1144,7 +1172,10 @@ thunar_standard_view_merge_menu_extensions (ThunarStandardView *standard_view,
       standard_view->priv->extension_merge_id = gtk_ui_manager_new_merge_id (standard_view->ui_manager);
       gtk_ui_manager_insert_action_group (standard_view->ui_manager, standard_view->priv->extension_actions, -1);
 
-      /* add the actions */
+      /* sort the actions by their labels */
+      actions = g_list_sort (actions, compare_actions);
+
+      /* add the actions to the UI manager */
       for (lp = actions; lp != NULL; lp = lp->next)
         {
           /* add the action to the action group */