diff options
author | Not Zed <NotZed@Ximian.com> | 2001-02-23 06:27:40 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-02-23 06:27:40 +0800 |
commit | 351903ad90942abecccf363f97a6639c74ef2e58 (patch) | |
tree | 9ab0be988df48a43aac83f2a789a9918e24d2517 /mail/mail-vtrash.c | |
parent | 7698a3941bb5ad9faf3b5b4831e0400f81cc9b64 (diff) | |
download | gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.gz gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.bz2 gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.lz gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.xz gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.tar.zst gsoc2013-evolution-351903ad90942abecccf363f97a6639c74ef2e58.zip |
Make op cancellable/report internals. (get_folder_get):
2001-02-23 Not Zed <NotZed@Ximian.com>
* mail-ops.c (create_folder_get): Make op cancellable/report
internals.
(get_folder_get):
(sync_folder_sync):
(get_folderinfo_get): Make op cancellable/report internals.
* mail-vtrash.c (get_trash_get): Setup the operation registration,
and create a pseudo "start/stop" operation.
* component-factory.c (owner_set_cb): Make trash creation async.
* mail-local.c (register_folder_desc): A description of what we're
doing.
* mail-mt.c (mail_msg_new): Set status callback to operation_new.
(mail_operation_status): Operation status function, proxy messages
to main thread, and attempt to present a meaningful ui experience
for operations.
svn path=/trunk/; revision=8351
Diffstat (limited to 'mail/mail-vtrash.c')
-rw-r--r-- | mail/mail-vtrash.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/mail/mail-vtrash.c b/mail/mail-vtrash.c index ff76756e73..207e72ef06 100644 --- a/mail/mail-vtrash.c +++ b/mail/mail-vtrash.c @@ -55,22 +55,22 @@ extern CamelSession *session; CamelFolder * vtrash_uri_to_folder (const char *uri, CamelException *ex) { - CamelFolder *folder = NULL; - - g_return_val_if_fail (uri != NULL, NULL); - - if (strncmp (uri, "vtrash:", 7)) - return NULL; - - VTRASH_LOCK (vtrash_hash_lock); - if (vtrash_hash) { - folder = g_hash_table_lookup (vtrash_hash, uri); - - camel_object_ref (CAMEL_OBJECT (folder)); - } - VTRASH_UNLOCK (vtrash_hash_lock); - - return folder; + CamelFolder *folder = NULL; + + g_return_val_if_fail (uri != NULL, NULL); + + if (strncmp (uri, "vtrash:", 7)) + return NULL; + + VTRASH_LOCK (vtrash_hash_lock); + if (vtrash_hash) { + folder = g_hash_table_lookup (vtrash_hash, uri); + + camel_object_ref (CAMEL_OBJECT (folder)); + } + VTRASH_UNLOCK (vtrash_hash_lock); + + return folder; } static void @@ -207,7 +207,10 @@ get_trash_get (struct _mail_msg *mm) struct _get_trash_msg *m = (struct _get_trash_msg *)mm; CamelStore *store; GPtrArray *urls; - + + camel_operation_register(mm->cancel); + camel_operation_start(mm->cancel, _("Getting matches")); + urls = g_ptr_array_new (); /* we don't want to connect */ @@ -239,6 +242,9 @@ get_trash_get (struct _mail_msg *mm) vtrash_add (store, m->folder, m->store_uri, _("vTrash")); } } + + camel_operation_end(mm->cancel); + camel_operation_unregister(mm->cancel); } static void |