From 9e126a8d01dd36a19ab34a9d3edf016897b12d7e Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 31 Mar 2004 10:09:04 +0000 Subject: Cleaned up header inclusions and added plenty of forward declarations. 2004-03-31 Not Zed * *.[ch]: Cleaned up header inclusions and added plenty of forward declarations. Sped up complete re-compilation by upto 20%. ** See bug #55950. * em-utils.c (em_utils_in_addressbook): utility for checking if an email address is in the addressbook. I can't tell if it works 'cause it crashes eds. * em-format-html.c (emfh_gethttp): handle addressbook checking. 2004-03-30 Not Zed * mail-config.h: clean up the headers and use some forward decl's instead. * em-format-html.c (em_format_html_set_load_http): change state to an int 'style' instead. * em-folder-view.c (emfv_setting_notify): set the format load http option to the config value directly. ** See bug #56147. * message-list.c (clear_info): set the node data to NULL when we unref its data. (ml_get_save_id): use a different test for the root node, and return NULL if we don't have any data on the node (because we're cleaing it). ** See bug #54962. * em-folder-tree.c (emft_popup_new_folder_response): put back the old hack to open the vfolder editor if you try to create a folder under vfolders. ** See bug #55940. * mail-autofilter.c (mail_filter_rename_uri): map the uri to an email uri before passing to filter code. (mail_filter_delete_uri): same here. svn path=/trunk/; revision=25261 --- mail/message-list.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'mail/message-list.c') diff --git a/mail/message-list.c b/mail/message-list.c index 6403c1549c..f29971dfa2 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -32,9 +32,11 @@ #include -#include #include +#include +#include + #include #include #include @@ -774,9 +776,15 @@ ml_get_save_id (ETreeModel *etm, ETreePath path, void *data) { CamelMessageInfo *info; + if (e_tree_model_node_is_root(etm, path)) + return g_strdup("root"); + + /* Note: etable can ask for the save_id while we're clearing it, + which is the only time data should be null */ info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path); if (info == NULL) - return g_strdup("root"); + return NULL; + return g_strdup (camel_message_info_uid(info)); } @@ -1844,6 +1852,7 @@ clear_info(char *key, ETreePath *node, MessageList *ml) info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node); camel_folder_free_message_info(ml->folder, info); + e_tree_memory_node_set_data((ETreeMemory *)ml->model, node, NULL); } static void -- cgit v1.2.3