Index: mail/ChangeLog
===================================================================
--- mail/ChangeLog	(revision 33778)
+++ mail/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2007-07-09  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #231178
+
+	* filtertypes.xml: Added 'label' filtertype to the list.
+
 2006-08-31  Matthew Barnes  <mbarnes@redhat.com>
 
 	* em-folder-view.c: (emfv_setup_view_instance)
Index: mail/em-filter-i18n.h
===================================================================
--- mail/em-filter-i18n.h	(revision 33778)
+++ mail/em-filter-i18n.h	(working copy)
@@ -4,6 +4,7 @@
 char *s = N_("Assign Score");
 char *s = N_("Attachments");
 char *s = N_("Beep");
+char *s = N_("Completed On");
 char *s = N_("contains");
 char *s = N_("Copy to Folder");
 char *s = N_("Date received");
@@ -32,6 +33,8 @@
 char *s = N_("is less than");
 char *s = N_("is not");
 char *s = N_("is not Flagged");
+char *s = N_("is not set");
+char *s = N_("is set");
 char *s = N_("Junk");
 char *s = N_("Junk Test");
 char *s = N_("Label");
@@ -54,6 +57,7 @@
 char *s = N_("Run Program");
 char *s = N_("Score");
 char *s = N_("Sender");
+char *s = N_("Set Label");
 char *s = N_("Set Status");
 char *s = N_("Size (kB)");
 char *s = N_("sounds like");
Index: mail/filtertypes.xml
===================================================================
--- mail/filtertypes.xml	(revision 33778)
+++ mail/filtertypes.xml	(working copy)
@@ -681,6 +681,11 @@
   <title>Stop Processing</title>
   <code>(stop)</code>
  </part>
+ <part name="label">
+  <title>Set Label</title>
+  <code>(set-label ${label})</code>
+  <input type="label" name="label"/>
+ </part>
  <part name="colour">
   <title>Assign Color</title>
   <code>(set-colour ${colour})</code>
Index: filter/filter-label.c
===================================================================
--- filter/filter-label.c	(revision 33778)
+++ filter/filter-label.c	(working copy)
@@ -37,6 +37,7 @@
 
 #include "filter-label.h"
 #include <libedataserver/e-sexp.h>
+#include "e-util/e-util.h"
 
 #define d(x) 
 
@@ -157,7 +158,7 @@
 	FilterOption *fo = (FilterOption *) fe;
 	GConfClient *gconf;
 	GSList *list, *l;
-	char *title, *p;
+	char *title, *p, *nounderscores_title;
 	int i = 0;
 	
         FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
@@ -170,8 +171,11 @@
 		if ((p = strrchr (title, ':')))
 			*p++ = '\0';
 		
-		filter_option_add (fo, i < 5 ? labels[i++].value : (p ? p : "#ffffff"), title, NULL);
+		nounderscores_title = e_str_without_underscores (title);
+		
+		filter_option_add (fo, i < 5 ? labels[i++].value : (p ? p : "#ffffff"), nounderscores_title, NULL);
 		g_free (title);
+		g_free (nounderscores_title);
 		
 		l = l->next;
 	}
Index: filter/ChangeLog
===================================================================
--- filter/ChangeLog	(revision 33778)
+++ filter/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-07-09  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #231178
+
+	* filter-label.c: (xml_create):
+	Removes underscores from titles.
+
 2007-06-15  Milan Crha  <mcrha@redhat.com>
 
 	** Fix for bug #263207
