diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-11-05 13:21:10 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-11-07 09:10:57 +0800 |
commit | 41f0d7117eb958bd4a153c27e3cd0a58e14f4d75 (patch) | |
tree | 472b21d27779f0c4cfc55869532b35ae85ef7f8c /mail | |
parent | 8382a9cbfb2c58cee99c34a93d027a50a1bf695c (diff) | |
download | gsoc2013-evolution-41f0d7117eb958bd4a153c27e3cd0a58e14f4d75.tar.gz gsoc2013-evolution-41f0d7117eb958bd4a153c27e3cd0a58e14f4d75.tar.zst gsoc2013-evolution-41f0d7117eb958bd4a153c27e3cd0a58e14f4d75.zip |
Adapt to CamelOperation API changes.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/em-format-html.c | 2 | ||||
-rw-r--r-- | mail/em-utils.c | 4 | ||||
-rw-r--r-- | mail/mail-mt.c | 4 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 2 | ||||
-rw-r--r-- | mail/message-list.c | 12 |
5 files changed, 9 insertions, 15 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c index f3209b8b89..9a7c87f105 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1614,7 +1614,7 @@ emfh_gethttp (struct _EMFormatHTMLJob *job, costream = camel_data_cache_add (emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL); do { - if (camel_operation_cancel_check (CAMEL_OPERATION (cancellable))) { + if (g_cancellable_is_cancelled (cancellable)) { n = -1; break; } diff --git a/mail/em-utils.c b/mail/em-utils.c index 67978884d0..399e51294b 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1458,7 +1458,7 @@ try_open_book_client (EBookClient *book_client, E_CLIENT (book_client), only_if_exists, cancellable, try_open_book_client_cb, &data); - while (canceled = camel_operation_cancel_check (NULL), + while (canceled = g_cancellable_is_cancelled (cancellable), !canceled && !e_flag_is_set (flag)) { GTimeVal wait; @@ -1690,8 +1690,6 @@ search_address_in_addressbooks (const gchar *address, mail_cancel_hook_remove (hook_stop); - stop = stop || camel_operation_cancel_check (NULL); - if (stop && !cached_book && book_client) { g_object_unref (book_client); } else if (!stop && book_client && !cached_book) { diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 0d05a21a86..526571f61f 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -283,7 +283,7 @@ mail_msg_cancel (guint msgid) g_mutex_unlock (mail_msg_lock); if (cancellable != NULL) { - camel_operation_cancel (CAMEL_OPERATION (cancellable)); + g_cancellable_cancel (cancellable); g_object_unref (cancellable); } } @@ -340,7 +340,7 @@ mail_cancel_hook_remove (GHook *hook) void mail_cancel_all (void) { - camel_operation_cancel (NULL); + camel_operation_cancel_all (); g_mutex_lock (mail_msg_lock); diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 33ac977e35..167b4fd872 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -191,7 +191,7 @@ receive_cancel (GtkButton *button, struct _send_info *info) { if (info->state == SEND_ACTIVE) { - camel_operation_cancel (CAMEL_OPERATION (info->cancellable)); + g_cancellable_cancel (info->cancellable); if (info->status_label) gtk_label_set_text ( GTK_LABEL (info->status_label), diff --git a/mail/message-list.c b/mail/message-list.c index 1e903a3f48..e01f42fca2 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -4999,20 +4999,16 @@ mail_regen_cancel (MessageList *ml) { /* cancel any outstanding regeneration requests, not we don't clear, they clear themselves */ if (ml->regen) { - GList *l; + GList *link; g_mutex_lock (ml->regen_lock); - l = ml->regen; - while (l) { - MailMsg *mm = l->data; + for (link = ml->regen; link != NULL; link = link->next) { + MailMsg *mm = link->data; GCancellable *cancellable; cancellable = e_activity_get_cancellable (mm->activity); - if (CAMEL_IS_OPERATION (cancellable)) - camel_operation_cancel ( - CAMEL_OPERATION (cancellable)); - l = l->next; + g_cancellable_cancel (cancellable); } g_mutex_unlock (ml->regen_lock); |