From 645f69dcf6d0b6162c5c7843371c559486234175 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 5 Mar 2000 14:51:49 +0000 Subject: Added a prototype message listing. 2000-03-05 Christopher James Lahey * message-list.c: Added a prototype message listing. svn path=/trunk/; revision=2059 --- mail/ChangeLog | 4 ++++ mail/message-list.c | 27 ++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 8b27037024..f5e7dd91c0 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,7 @@ +2000-03-05 Christopher James Lahey + + * message-list.c: Added a prototype message listing. + 2000-03-04 Christopher James Lahey * message-list.c: Set up the column headers properly. diff --git a/mail/message-list.c b/mail/message-list.c index 4a0fe0049c..1a5913df25 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -12,6 +12,7 @@ #include #include "e-util/e-util.h" #include "camel/camel-exception.h" +#include "camel/camel-folder-summary.h" #include "message-list.h" #include "Mail.h" #include "widgets/e-table/e-table-header-item.h" @@ -76,8 +77,19 @@ static void * ml_value_at (ETableModel *etm, int col, int row, void *data) { static char buffer [10]; - + MessageList *message_list = data; + CamelFolderSummary *summary; + const GArray *array; + CamelMessageInfo *info; + CamelException *ex; + CamelMimeMessage *message; + ex = camel_exception_new (); + summary = camel_folder_get_summary(message_list->folder, ex); + array = camel_folder_summary_get_message_info_list(summary); + info = &g_array_index(array, CamelMessageInfo, row); + /*message = camel_folder_get_message_by_uid(message_list->folder, info->uid, ex);*/ + camel_exception_free (ex); switch (col){ case COL_ONLINE_STATUS: return GINT_TO_POINTER (0); @@ -92,10 +104,16 @@ ml_value_at (ETableModel *etm, int col, int row, void *data) return GINT_TO_POINTER (0); case COL_FROM: - return "miguel@dudical.com"; + if ( info->sender ) + return info->sender; + else + return ""; case COL_SUBJECT: - return "MONEY FAST!"; + if ( info->subject ) + return info->subject; + else + return ""; case COL_SENT: return "sent"; @@ -171,7 +189,6 @@ ml_free_value (ETableModel *etm, int col, void *value, void *data) default: g_assert_not_reached (); } - return NULL; } static void @@ -375,7 +392,7 @@ message_list_init (GtkObject *object) * The etable */ - message_list->etable = e_table_new (message_list->header_model, message_list->table_model, " 0 1 2 3 4 5 6 7 8 9 "); + message_list->etable = e_table_new (message_list->header_model, message_list->table_model, " 0 1 2 3 4 5 6 7 8 9 "); gtk_widget_show(message_list->etable); -- cgit v1.2.3