aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index f9772fa7b0..7499cbb651 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -71,6 +71,7 @@ static gint on_right_click (ETableScrolled *table, gint row, gint col, GdkEvent
static void on_double_click (ETableScrolled *table, gint row, MessageList *list);
static void select_msg (MessageList *message_list, gint row);
static char *filter_date (const void *data);
+static void nuke_uids (GtkObject *o);
static struct {
char **image_base;
@@ -591,6 +592,8 @@ message_list_init (GtkObject *object)
ml_tree_is_cell_editable,
message_list);
e_tree_model_root_node_set_visible ((ETreeModel *)message_list->table_model, FALSE);
+ gtk_signal_connect (GTK_OBJECT (message_list->table_model), "destroy",
+ (GtkSignalFunc) nuke_uids, NULL);
message_list_init_renderers (message_list);
message_list_init_header (message_list);
@@ -846,6 +849,23 @@ build_subtree (MessageList *ml, ETreePath *parent,
}
}
+static gboolean
+nuke_uids_cb (GNode *node, gpointer data)
+{
+ g_free (e_tree_model_node_get_data (E_TREE_MODEL (data), node));
+ return FALSE;
+}
+
+static void
+nuke_uids (GtkObject *o)
+{
+ ETreeModel *etm = E_TREE_MODEL (o);
+
+ g_node_traverse (etm->root, G_IN_ORDER,
+ G_TRAVERSE_ALL, 0,
+ nuke_uids_cb, etm);
+}
+
static void
build_flat (MessageList *ml, GPtrArray *uids)
{