[evolution] Bug #553796 - Unable to Reset Message Color



commit 0972cb0671b13783594ba9ad92c604e27e479152
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 7 14:36:17 2012 +0100

    Bug #553796 - Unable to Reset Message Color

 mail/em-filter-i18n.h |    1 +
 mail/filtertypes.xml  |    4 ++++
 mail/message-list.c   |    5 ++++-
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h
index ba16ee3..4173b66 100644
--- a/mail/em-filter-i18n.h
+++ b/mail/em-filter-i18n.h
@@ -72,4 +72,5 @@ gchar *s = N_("starts with");
 gchar *s = N_("Status");
 gchar *s = N_("Stop Processing");
 gchar *s = N_("Subject");
+gchar *s = N_("Unset Color");
 gchar *s = N_("Unset Status");
diff --git a/mail/filtertypes.xml b/mail/filtertypes.xml
index 9a705ab..3e9bd08 100644
--- a/mail/filtertypes.xml
+++ b/mail/filtertypes.xml
@@ -931,6 +931,10 @@
   <code>(set-color ${colour})</code>
   <input type="colour" name="colour"/>
  </part>
+ <part name="unset-color">
+  <title>Unset Color</title>
+  <code>(set-color "")</code>
+ </part>
  <part name="score">
   <title>Assign Score</title>
   <code>(set-score ${score})</code>
diff --git a/mail/message-list.c b/mail/message-list.c
index 82f6540..fc35e3f 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1704,7 +1704,7 @@ ml_tree_value_at_ex (ETreeModel *etm,
 		/* To add to the woes, what color to show when the user choose multiple labels ?
 		Don't say that I need to have the new labels[with subject] column visible always */
 
-		colour = camel_message_info_user_tag(msg_info, "color");
+		colour = NULL;
 		due_by = camel_message_info_user_tag(msg_info, "due-by");
 		completed = camel_message_info_user_tag(msg_info, "completed-on");
 		followup = camel_message_info_user_tag(msg_info, "follow-up");
@@ -1746,6 +1746,9 @@ ml_tree_value_at_ex (ETreeModel *etm,
 			g_hash_table_destroy (ld.labels_tag2iter);
 		}
 
+		if (!colour)
+			colour = camel_message_info_user_tag (msg_info, "color");
+
 		return (gpointer) colour;
 	}
 	case COL_LOCATION: {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]