aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-06-03 10:52:32 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-06-03 10:52:32 +0800
commitaa3bfbe4224ff1c99d358aeac464ce7e9f0963a8 (patch)
treee5e16e67b4fdf2e67aad5ebc04dbbc328d0eb5bc /mail/message-list.c
parent81ae35a505ec589bc5c59f5e5ae8d034c2aa9169 (diff)
downloadgsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.gz
gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.tar.zst
gsoc2013-evolution-aa3bfbe4224ff1c99d358aeac464ce7e9f0963a8.zip
Implement, return a text description of the localfolder.
2002-06-01 Not Zed <NotZed@Ximian.com> * mail-local.c (mlf_getv): Implement, return a text description of the localfolder. * message-list.c (ml_duplicate_value): (ml_free_value): (ml_initialize_value): (ml_value_is_empty): (ml_value_to_string): (ml_tree_value_at): Implement COL_LOCATION, original location of message (useful for vfolder). svn path=/trunk/; revision=17072
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index f7a363b9f1..93dffcfdfb 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -575,6 +575,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
case COL_SUBJECT:
case COL_TO:
case COL_FOLLOWUP_FLAG:
+ case COL_LOCATION:
return g_strdup (value);
default:
@@ -604,6 +605,7 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
case COL_SUBJECT:
case COL_TO:
case COL_FOLLOWUP_FLAG:
+ case COL_LOCATION:
g_free (value);
break;
default:
@@ -632,6 +634,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
case COL_SUBJECT:
case COL_TO:
case COL_FOLLOWUP_FLAG:
+ case COL_LOCATION:
return g_strdup ("");
default:
g_assert_not_reached ();
@@ -661,6 +664,7 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_SUBJECT:
case COL_TO:
case COL_FOLLOWUP_FLAG:
+ case COL_LOCATION:
return !(value && *(char *)value);
default:
g_assert_not_reached ();
@@ -724,6 +728,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
case COL_SUBJECT:
case COL_TO:
case COL_FOLLOWUP_FLAG:
+ case COL_LOCATION:
return g_strdup (value);
default:
g_assert_not_reached ();
@@ -950,6 +955,19 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
}
return (void *)colour;
}
+ case COL_LOCATION: {
+ CamelFolder *folder;
+ char *name;
+
+ if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
+ folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
+ } else {
+ folder = message_list->folder;
+ }
+
+ camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
+ return name;
+ }
default:
g_assert_not_reached ();
return NULL;
@@ -1114,7 +1132,7 @@ message_list_create_extras (void)
"color_column", COL_COLOUR,
NULL);
e_table_extras_add_cell (extras, "render_size", cell);
-
+
return extras;
}