aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
diff options
context:
space:
mode:
authorMichael Zucci <zucchi@src.gnome.org>2000-07-06 20:32:55 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-07-06 20:32:55 +0800
commit1e8c9c87a020db396c8c87dd8c4dd746146e9058 (patch)
tree655f1f8238a430118b684f13e558bb40dfd16696 /mail/message-list.c
parent6cabd25cfa2f9438f4806e368b51373fac163d40 (diff)
downloadgsoc2013-evolution-1e8c9c87a020db396c8c87dd8c4dd746146e9058.tar.gz
gsoc2013-evolution-1e8c9c87a020db396c8c87dd8c4dd746146e9058.tar.zst
gsoc2013-evolution-1e8c9c87a020db396c8c87dd8c4dd746146e9058.zip
Well, delete, expunge, appear broken, it sorts (initially) at least now.
* message-thread.c (sort_thread): sort messages based on date for the initial sort order. (thread_messages_free): Implement. (message_list_init): set the root node invisible afterall. (message_list_set_search): Clear the old tree before putting in a new one. svn path=/trunk/; revision=3922
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index 799b2aeab5..f12fec302b 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -787,8 +787,7 @@ message_list_init (GtkObject *object)
ml_tree_set_value_at,
ml_tree_is_cell_editable,
message_list);
- /* setting this seems to upset the display, not sure. It should be set though */
- /*e_tree_model_root_node_set_visible((ETableModel *)message_list->table_model, FALSE); */
+ e_tree_model_root_node_set_visible((ETreeModel *)message_list->table_model, FALSE);
} else {
message_list->table_model = e_table_simple_new (
ml_col_count, ml_row_count, ml_value_at,
@@ -1059,7 +1058,13 @@ message_list_set_search (MessageList *message_list, const char *search)
if (message_list->is_tree_view) {
struct _container *head;
+ /* clear the old list */
+ if (message_list->tree_root)
+ e_tree_model_node_remove((ETreeModel *)message_list->table_model, message_list->tree_root);
+
+ /* thread the new */
head = thread_messages((CamelMessageInfo **)message_list->summary_table->pdata, message_list->summary_table->len);
+ /* and populate ... */
message_list->tree_root = e_tree_model_node_insert((ETreeModel *)message_list->table_model, NULL, 0, message_list);
e_tree_model_node_set_expanded((ETreeModel *)message_list->table_model, message_list->tree_root, TRUE);
build_tree(message_list, message_list->tree_root, head);
@@ -1092,8 +1097,9 @@ message_changed (CamelFolder *f, const char *uid, MessageList *message_list)
int row;
row = get_message_row (message_list, uid);
- if (row != -1)
+ if (row != -1) {
e_table_model_row_changed (message_list->table_model, row);
+ }
}
void