diff options
author | Not Zed <NotZed@Ximian.com> | 2001-01-29 17:33:15 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-29 17:33:15 +0800 |
commit | aad4202594a706636bc893b8716a573861216175 (patch) | |
tree | f0e1c0efaf1b86a1408805353f3e914216aa469a /mail/mail-send-recv.c | |
parent | 1b18f022ca57ebebb272a148b25173d92b2b89c5 (diff) | |
download | gsoc2013-evolution-aad4202594a706636bc893b8716a573861216175.tar.gz gsoc2013-evolution-aad4202594a706636bc893b8716a573861216175.tar.zst gsoc2013-evolution-aad4202594a706636bc893b8716a573861216175.zip |
Debug function to compare the tree we think we have, after an incremental
2001-01-29 Not Zed <NotZed@Ximian.com>
* message-list.c (tree_equal): Debug function to compare the tree
we think we have, after an incremental update.
(build_tree): Check the tree after we've built it.
* mail-mt.c (mail_get_password): If we are being called from the
main gui thread, then just call the dialogue directly. Ideally we
dont want this anyway but lets handle the case nicely.
(mail_get_password): Try locking around the password request, to
single-queue any password requests.
(mail_msg_init): Push an exit handler to clean it up on completion.
* mail-send-recv.c (receive_update_got_store): New function called
when the store has been retrieved asynchronously.
(mail_send_receive): Get the store asynchronously. This was
causing problems where the password dialogue would try and be
called from the main thread via a message.
* mail-ops.c (mail_get_store): New function to get a store
(a)synchronously. More or less taken from subscribe-dialog, which
i will remove later.
(mail_scan_subfolders): Try running the scan subfolder thing
asynchronously, to help startup time. Not sure if this will work,
but presumably the shell can handle the folders appearing later
ok.
svn path=/trunk/; revision=7886
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r-- | mail/mail-send-recv.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 6b375f2a1b..dce23ad56d 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -470,6 +470,24 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep return folder; } +static void +receive_update_got_store(char *uri, CamelStore *store, void *data) +{ + struct _send_info *info = data; + + if (store) { + EvolutionStorage *storage = mail_lookup_storage(store); + if (storage) { + mail_update_subfolders(store, storage, receive_update_done, info); + gtk_object_unref((GtkObject *)storage); + } else { + receive_done("", info); + } + } else { + receive_done("", info); + } +} + void mail_send_receive(void) { GSList *sources; @@ -478,8 +496,6 @@ void mail_send_receive(void) struct _send_data *data; extern CamelFolder *outbox_folder; const MailConfigAccount *account; - CamelStore *store; - CamelException *ex; sources = mail_config_get_sources(); if (!sources) @@ -519,21 +535,7 @@ void mail_send_receive(void) break; case SEND_UPDATE: /* FIXME: error reporting? */ - ex = camel_exception_new(); - store = camel_session_get_store(session, info->uri, ex); - if (store) { - EvolutionStorage *storage = mail_lookup_storage(store); - if (storage) { - mail_update_subfolders(store, storage, receive_update_done, info); - gtk_object_unref((GtkObject *)storage); - } else { - receive_done("", info); - } - camel_object_unref((CamelObject *)store); - } else { - receive_done("", info); - } - camel_exception_free(ex); + mail_get_store(info->uri, receive_update_got_store, info); break; } scan = scan->next; |