Index: rule-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/rule-editor.c,v
retrieving revision 1.28
diff -u -p -r1.28 rule-editor.c
--- rule-editor.c	2001/11/27 21:46:22	1.28
+++ rule-editor.c	2002/01/23 23:56:31
@@ -499,6 +499,15 @@ double_click (GtkWidget *widget, GdkEven
 		rule_edit (widget, re);
 }
 
+static int
+sort_rule_name(gconstpointer a, gconstpointer b)
+{
+	FilterRule *rule1 = (FilterRule *) gtk_object_get_data(GTK_OBJECT(a), "rule");
+	FilterRule *rule2 = (FilterRule *) gtk_object_get_data(GTK_OBJECT(b), "rule");
+
+	return g_utf8_collate(rule1->name, rule2->name);
+}
+
 static void
 set_source (RuleEditor *re, const char *source)
 {
@@ -518,9 +527,9 @@ set_source (RuleEditor *re, const char *
 		g_free (s);
 		gtk_object_set_data (GTK_OBJECT (item), "rule", rule);
 		gtk_widget_show (GTK_WIDGET (item));
-		newitems = g_list_append (newitems, item);
+		newitems = g_list_insert_sorted (newitems, item, sort_rule_name);
 	}
-	
+
 	gtk_list_append_items (re->list, newitems);
 	g_free (re->source);
 	re->source = g_strdup (source);
