aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-15 11:16:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-15 11:48:02 +0800
commit5310e4a0b10ded4c77ce9dfaff49d3e99e327462 (patch)
treeb29d85e7bb2e7b3e772859fa7e0e2ff9ab33846e /mail/mail-mt.c
parent47d25995c5ca78ff530ce6a23faebf6547898e8e (diff)
downloadgsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.gz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.bz2
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.lz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.xz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.zst
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.zip
Adapt to CamelOperation API changes.
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index b8bfba3d29..ce26572756 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -75,10 +75,16 @@ mail_msg_new (MailMsgInfo *info)
msg->info = info;
msg->ref_count = 1;
msg->seq = mail_msg_seq++;
- msg->cancel = camel_operation_new (mail_operation_status, GINT_TO_POINTER (msg->seq));
+ msg->cancel = camel_operation_new ();
+
msg->priv = g_slice_new0 (MailMsgPrivate);
msg->priv->cancelable = TRUE;
+ g_signal_connect (
+ msg->cancel, "status",
+ G_CALLBACK (mail_operation_status),
+ GINT_TO_POINTER (msg->seq));
+
g_hash_table_insert (mail_msg_active_table, GINT_TO_POINTER (msg->seq), msg);
d(printf("New message %p\n", msg));
@@ -140,10 +146,8 @@ mail_msg_free (MailMsg *mail_msg)
if (mail_msg->priv->activity != NULL)
g_object_unref (mail_msg->priv->activity);
- if (mail_msg->cancel != NULL) {
- camel_operation_mute (mail_msg->cancel);
- camel_operation_unref (mail_msg->cancel);
- }
+ if (mail_msg->cancel != NULL)
+ g_object_unref (mail_msg->cancel);
if (mail_msg->error != NULL)
g_error_free (mail_msg->error);
@@ -470,7 +474,7 @@ mail_msg_proxy (MailMsg *msg)
if (msg->info->desc != NULL && msg->cancel) {
camel_operation_end (msg->cancel);
- camel_operation_unregister (msg->cancel);
+ camel_operation_unregister ();
}
g_async_queue_push (msg_reply_queue, msg);
@@ -979,14 +983,6 @@ mail_operation_status (CamelOperation *op,
m = mail_msg_new (&op_status_info);
m->op = op;
m->what = g_strdup (what);
- switch (pc) {
- case CAMEL_OPERATION_START:
- pc = 0;
- break;
- case CAMEL_OPERATION_END:
- pc = 100;
- break;
- }
m->pc = pc;
m->data = data;
mail_msg_main_loop_push (m);