aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c40
2 files changed, 44 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8be9ee5e94..b7bb24d9f6 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2000-03-04 Christopher James Lahey <clahey@helixcode.com>
+ * message-list.c: Define ml_duplicate_value and ml_free_value
+ correctly.
+
+2000-03-04 Christopher James Lahey <clahey@helixcode.com>
+
* message-list.c: Use g_int_compare and g_str_compare as we should
be instead of g_int_equal and g_str_equal.
diff --git a/mail/message-list.c b/mail/message-list.c
index ef207ec7f2..aad21670a3 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -130,12 +130,48 @@ ml_is_cell_editable (ETableModel *etm, int col, int row, void *data)
static void *
ml_duplicate_value (ETableModel *etm, int col, const void *value, void *data)
{
- return value;
+ switch (col){
+ case COL_ONLINE_STATUS:
+ case COL_MESSAGE_STATUS:
+ case COL_PRIORITY:
+ case COL_ATTACHMENT:
+ return value;
+
+ case COL_FROM:
+ case COL_SUBJECT:
+ case COL_SENT:
+ case COL_RECEIVE:
+ case COL_TO:
+ case COL_SIZE:
+ return g_strdup(value);
+ default:
+ g_assert_not_reached ();
+ }
+ return NULL;
}
static void
ml_free_value (ETableModel *etm, int col, void *value, void *data)
{
+ switch (col){
+ case COL_ONLINE_STATUS:
+ case COL_MESSAGE_STATUS:
+ case COL_PRIORITY:
+ case COL_ATTACHMENT:
+ break;
+
+ case COL_FROM:
+ case COL_SUBJECT:
+ case COL_SENT:
+ case COL_RECEIVE:
+ case COL_TO:
+ case COL_SIZE:
+ g_free(value);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+ return NULL;
}
static void
@@ -340,6 +376,8 @@ message_list_init (GtkObject *object)
*/
message_list->etable = e_table_new (message_list->header_model, message_list->table_model, "<ETableSpecification> <columns-shown> <column> 0 </column> <column> 1 </column> <column> 2 </column> <column> 3 </column> <column> 4 </column> <column> 5 </column> <column> 6 </column> <column> 7 </column> <column> 8 </column> <column> 9 </column> </columns-shown> <grouping> <leaf column=\"0\" ascending=\"1\"/> </grouping> </ETableSpecification>");
+
+ gtk_widget_show(message_list->etable);
/*
* We do own the Etable, not some widget container