aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-07-05 05:40:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-07-09 02:37:52 +0800
commit137b0743ddfbd3bbc01c9813615ede91ddd9b954 (patch)
tree1d8e09ba0239eff419d432bdd8d5b521fbb727ba /mail/mail-mt.c
parent36f1f29b9a42c56a619e031b045db5a18f2b1dd7 (diff)
downloadgsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.gz
gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.zst
gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.zip
Migrate from CamelException to GError.
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 76a6ccc488..97144818d3 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -76,7 +76,6 @@ mail_msg_new (MailMsgInfo *info)
msg->ref_count = 1;
msg->seq = mail_msg_seq++;
msg->cancel = camel_operation_new(mail_operation_status, GINT_TO_POINTER(msg->seq));
- camel_exception_init(&msg->ex);
msg->priv = g_slice_new0 (MailMsgPrivate);
msg->priv->cancelable = TRUE;
@@ -146,7 +145,9 @@ mail_msg_free (MailMsg *mail_msg)
camel_operation_unref (mail_msg->cancel);
}
- camel_exception_clear (&mail_msg->ex);
+ if (mail_msg->error != NULL)
+ g_error_free (mail_msg->error);
+
g_slice_free (MailMsgPrivate, mail_msg->priv);
g_slice_free1 (mail_msg->info->size, mail_msg);
}
@@ -245,9 +246,9 @@ mail_msg_check_error (gpointer msg)
checkmem(m->priv);
#endif
- if (!camel_exception_is_set(&m->ex)
- || m->ex.id == CAMEL_EXCEPTION_USER_CANCEL
- || m->ex.id == CAMEL_EXCEPTION_FOLDER_INVALID_UID
+ if (m->error == NULL
+ || g_error_matches (m->error, G_IO_ERROR, G_IO_ERROR_CANCELLED)
+ || g_error_matches (m->error, CAMEL_FOLDER_ERROR, CAMEL_FOLDER_ERROR_INVALID_UID)
|| (m->cancel && camel_operation_cancel_check (m->cancel)))
return;
@@ -260,7 +261,7 @@ mail_msg_check_error (gpointer msg)
if (g_hash_table_lookup(active_errors, m->info)) {
g_message (
"Error occurred while existing dialogue active:\n%s",
- camel_exception_get_description(&m->ex));
+ m->error->message);
return;
}
@@ -270,12 +271,12 @@ mail_msg_check_error (gpointer msg)
&& (what = m->info->desc (m))) {
gd = (GtkDialog *) e_alert_dialog_new_for_args (
parent, "mail:async-error", what,
- camel_exception_get_description(&m->ex), NULL);
+ m->error->message, NULL);
g_free(what);
} else
gd = (GtkDialog *) e_alert_dialog_new_for_args (
parent, "mail:async-error-nodescribe",
- camel_exception_get_description(&m->ex), NULL);
+ m->error->message, NULL);
g_hash_table_insert(active_errors, m->info, gd);
g_signal_connect(gd, "response", G_CALLBACK(error_response), m->info);