aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-04-26 18:39:07 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-04-26 18:39:07 +0800
commit5452ffb09063d0291a25f57929a28023a1204108 (patch)
tree6aca1c2bf481708d1d45542994f56f07c55fd7bf /mail
parentc07e50ba36fa093bb7af63934d044ff0378fbba8 (diff)
downloadgsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar.gz
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar.bz2
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar.lz
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar.xz
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.tar.zst
gsoc2013-evolution-5452ffb09063d0291a25f57929a28023a1204108.zip
Committing a patch from Victor for adding a Sender header to message list.
svn path=/trunk/; revision=31905
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/message-list.c22
-rw-r--r--mail/message-list.etspec2
-rw-r--r--mail/message-list.h3
4 files changed, 34 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9a5f3bcad0..a1055fd224 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,15 @@
2006-04-26 Srinivasa Ragavan <sragavan@novell.com>
+ ** Patch from Victor for adding a Sender header to message list.
+
+ * message-list.c: (ml_duplicate_value), (ml_free_value),
+ (ml_initialize_value), (ml_value_is_empty), (ml_value_to_string),
+ (ml_tree_value_at): Handled the new column header.
+ * message-list.etspec: Added a new column header to spec.
+ * message-list.h: Added a new column
+
+2006-04-26 Srinivasa Ragavan <sragavan@novell.com>
+
* em-folder-view.c: (emfv_setup_view_instance): Comparing the
FolderInfo flags right, to make Mailbox to show From header in message
list for groupwise servers.
diff --git a/mail/message-list.c b/mail/message-list.c
index a9796afc45..7d9d4bbe3b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -158,6 +158,8 @@ static GtkTargetEntry ml_drop_types[] = {
#define COL_TO_WIDTH_MIN (32)
#define COL_SIZE_EXPANSION (6.0)
#define COL_SIZE_WIDTH_MIN (32)
+#define COL_SENDER_EXPANSION (24.0)
+#define COL_SENDER_WIDTH_MIN (32)
enum {
NORMALISED_SUBJECT,
@@ -901,7 +903,7 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
case COL_FOLLOWUP_FLAG:
case COL_LOCATION:
return g_strdup (value);
-
+ case COL_SENDER:
default:
g_assert_not_reached ();
}
@@ -932,6 +934,7 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
case COL_LOCATION:
g_free (value);
break;
+ case COL_SENDER:
default:
g_assert_not_reached ();
}
@@ -960,6 +963,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
case COL_FOLLOWUP_FLAG:
case COL_LOCATION:
return g_strdup ("");
+ case COL_SENDER:
default:
g_assert_not_reached ();
}
@@ -990,6 +994,7 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_FOLLOWUP_FLAG:
case COL_LOCATION:
return !(value && *(char *)value);
+ case COL_SENDER:
default:
g_assert_not_reached ();
return FALSE;
@@ -1054,6 +1059,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
case COL_FOLLOWUP_FLAG:
case COL_LOCATION:
return g_strdup (value);
+ case COL_SENDER:
default:
g_assert_not_reached ();
return NULL;
@@ -1290,7 +1296,19 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
camel_object_get(folder, NULL, CAMEL_OBJECT_DESCRIPTION, &name, 0);
return name;
}
- default:
+ case COL_SENDER:{
+ char **sender_name;
+ str = camel_message_info_from (msg_info);
+ if(str!=""){
+ sender_name=g_strsplit(str,"<",2);
+ return (void *)(*sender_name);
+ }
+ else
+ return (void *)("");
+
+ g_strfreev(sender_name);
+ }
+ default:
g_assert_not_reached ();
return NULL;
}
diff --git a/mail/message-list.etspec b/mail/message-list.etspec
index 1ba8a64187..5718d631c4 100644
--- a/mail/message-list.etspec
+++ b/mail/message-list.etspec
@@ -27,6 +27,8 @@
<ETableColumn model_col="13" _title="Original Location" expansion="0.2" minimum_width="32" resizable="true" cell="render_text" compare="string"/>
+ <ETableColumn model_col="14" compare_col="17" _title="Sender" expansion="1.0" minimum_width="32" resizable="true" cell="render_text" compare="address_compare" search="string" priority="10"/>
+
<ETableState>
<column source="0"/> <column source="3"/> <column source="1"/>
<column source="4"/> <column source="5" expansion="1.60"/> <column source="6" expansion="0.40"/>
diff --git a/mail/message-list.h b/mail/message-list.h
index 301f2327f8..4033d037a5 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -55,7 +55,8 @@ enum {
COL_FOLLOWUP_FLAG_STATUS,
COL_FOLLOWUP_FLAG,
COL_FOLLOWUP_DUE_BY,
- COL_LOCATION, /* vfolder location? */
+ COL_LOCATION, /* vfolder location? */
+ COL_SENDER,
/* normalised strings */
COL_FROM_NORM,