diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 23 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 26 |
2 files changed, 41 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 11cd7cd92e..306a003176 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,12 @@ 2004-01-05 Jeffrey Stedfast <fejj@ximian.com> + * em-folder-tree-model.c (folder_subscribed_cb): If we aren't in + the main thread, proxy it over to the main thread. + (folder_unsubscribed_cb): Same. + (folder_created_cb): Here too. + (folder_deleted_cb): And here. + (folder_renamed_cb): Again here. + * em-folder-view.c (emfv_set_folder_uri): Pass mail_thread_queued to mail_get_folder() instead of mail_thread_new so that we eliminate a race when switching folders in the UI. @@ -20,14 +27,14 @@ * em-format-html-display.c: Mail warning grammar typo fix. 2003-12-22 David Moore <davmre@bellsouth.net> - - * em-popup.c (emp_part_popup_set_background): Implemented; sets an - image attachment as the GNOME wallpaper. - - * em-utils.c (emu_save_part_done): Created a prototype at the top - of the file. - (em_utils_save_part_to_file): Added; save a message part to a - specified file on disk. + + * em-popup.c (emp_part_popup_set_background): Implemented; sets an + image attachment as the GNOME wallpaper. + + * em-utils.c (emu_save_part_done): Created a prototype at the top + of the file. + (em_utils_save_part_to_file): Added; save a message part to a + specified file on disk. 2003-12-18 Rodney Dawes <dobey@ximian.com> diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index fdbf7ab93b..118f05f28e 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -39,6 +39,7 @@ #include "mail-config.h" #include "mail-session.h" #include "mail-tools.h" +#include "mail-mt.h" #include "em-utils.h" @@ -795,6 +796,11 @@ folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *mo gboolean load; char *dirname; + if (pthread_self () != mail_gui_thread) { + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_subscribed_cb, store, event_data, model); + return; + } + if (!(si = g_hash_table_lookup (model->store_hash, store))) return; @@ -849,6 +855,11 @@ folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel * GtkTreePath *path; GtkTreeIter iter; + if (pthread_self () != mail_gui_thread) { + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_unsubscribed_cb, store, event_data, model); + return; + } + if (!(si = g_hash_table_lookup (model->store_hash, store))) return; @@ -867,6 +878,11 @@ folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel * static void folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) { + if (pthread_self () != mail_gui_thread) { + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_created_cb, store, event_data, model); + return; + } + /* we only want created events to do more work if we don't support subscriptions */ if (!camel_store_supports_subscriptions (store)) folder_subscribed_cb (store, event_data, model); @@ -875,6 +891,11 @@ folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model static void folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model) { + if (pthread_self () != mail_gui_thread) { + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_deleted_cb, store, event_data, model); + return; + } + /* we only want deleted events to do more work if we don't support subscriptions */ if (!camel_store_supports_subscriptions (store)) folder_unsubscribed_cb (store, event_data, model); @@ -890,6 +911,11 @@ folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model GtkTreePath *path; char *parent, *p; + if (pthread_self () != mail_gui_thread) { + mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_renamed_cb, store, event_data, model); + return; + } + if (!(si = g_hash_table_lookup (model->store_hash, store))) return; |