aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-05-17 04:56:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-05-17 04:56:36 +0800
commit3cedfae4c21b3e2cdd53a74208f38c0e9885055f (patch)
tree33a553001856816f86305966900de187721ddcb6 /mail/message-list.c
parent03c399c656ca3cc0d206d15e2f0d217f045d3ee2 (diff)
downloadgsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar.gz
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar.bz2
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar.lz
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar.xz
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.tar.zst
gsoc2013-evolution-3cedfae4c21b3e2cdd53a74208f38c0e9885055f.zip
Check for a label tag when doing a lookup on the COLOR column.
2002-05-16 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (ml_tree_value_at): Check for a label tag when doing a lookup on the COLOR column. * mail-config.c (mail_config_get_label_color_string): Return the colour in string format. * folder-browser.c (set_msg_label): Replaces colourise_msg and sets the "label" tag rather than the "colour" tag. * mail-preferences.c (mail_preferences_apply): Call mail_config_write() so that the settings get synced to disk. svn path=/trunk/; revision=16938
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 480e9ceb89..f7a363b9f1 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -923,23 +923,30 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (!(msg_info->flags & CAMEL_MESSAGE_SEEN));
}
case COL_COLOUR: {
- const char *colour, *followup;
+ const char *colour, *followup, *label;
+
+ /* Priority: colour tag; label tag; important flag; follow-up tag */
colour = camel_tag_get ((CamelTag **) &msg_info->user_tags, "colour");
followup = camel_tag_get ((CamelTag **) &msg_info->user_tags, "follow-up");
- if (colour == NULL && msg_info->flags & CAMEL_MESSAGE_FLAGGED) {
- /* FIXME: extract from the xpm somehow. */
- colour = "#A7453E";
- } else if (followup != NULL) {
- struct _FollowUpTag *tag;
- time_t now = time (NULL);
-
- tag = message_tag_followup_decode (followup);
- if (tag && now >= tag->target_date) {
+ label = camel_tag_get ((CamelTag **) &msg_info->user_tags, "label");
+ if (colour == NULL) {
+ if (label != NULL) {
+ colour = mail_config_get_label_color_string (atoi (label));
+ } else if (msg_info->flags & CAMEL_MESSAGE_FLAGGED) {
/* FIXME: extract from the xpm somehow. */
colour = "#A7453E";
+ } else if (followup != NULL) {
+ struct _FollowUpTag *tag;
+ time_t now = time (NULL);
+
+ tag = message_tag_followup_decode (followup);
+ if (tag && now >= tag->target_date) {
+ /* FIXME: extract from the xpm somehow. */
+ colour = "#A7453E";
+ }
+ g_free (tag);
}
- g_free (tag);
}
return (void *)colour;
}