aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-28 00:04:57 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:34 +0800
commitadc1173159d4d5d953340f8f3c813681007de524 (patch)
tree8a0bfc8e9a11e3489f4def2bbb7fe0a4bd645aa2 /plugins
parent8894b72f2045388990b5696f3e8db97b9544ccf4 (diff)
downloadgsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.gz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.bz2
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.lz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.xz
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.tar.zst
gsoc2013-evolution-adc1173159d4d5d953340f8f3c813681007de524.zip
Check for cancelled GIO operation error code too
Diffstat (limited to 'plugins')
-rw-r--r--plugins/itip-formatter/itip-formatter.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index a04001f708..611324d05e 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -508,7 +508,8 @@ cal_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
if (!e_client_utils_open_new_finish (source, result, &client, &error)) {
client = NULL;
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
+ if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_error_free (error);
return;
}
@@ -801,6 +802,16 @@ get_object_without_rid_ready_cb (GObject *source_object, GAsyncResult *result, g
if (!e_cal_client_get_object_finish (cal_client, result, &icalcomp, &error))
icalcomp = NULL;
+ if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ find_cal_update_ui (fd, cal_client);
+ decrease_find_data (fd);
+ return;
+ }
+
+ g_clear_error (&error);
+
if (icalcomp) {
fd->puri->current_client = cal_client;
fd->keep_alarm_check = (fd->puri->method == ICAL_METHOD_PUBLISH || fd->puri->method == ICAL_METHOD_REQUEST) &&
@@ -816,9 +827,6 @@ get_object_without_rid_ready_cb (GObject *source_object, GAsyncResult *result, g
return;
}
- if (error)
- g_error_free (error);
-
find_cal_update_ui (fd, cal_client);
decrease_find_data (fd);
}
@@ -834,6 +842,16 @@ get_object_with_rid_ready_cb (GObject *source_object, GAsyncResult *result, gpoi
if (!e_cal_client_get_object_finish (cal_client, result, &icalcomp, &error))
icalcomp = NULL;
+ if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ g_error_free (error);
+ find_cal_update_ui (fd, cal_client);
+ decrease_find_data (fd);
+ return;
+ }
+
+ g_clear_error (&error);
+
if (icalcomp) {
fd->puri->current_client = cal_client;
fd->keep_alarm_check = (fd->puri->method == ICAL_METHOD_PUBLISH || fd->puri->method == ICAL_METHOD_REQUEST) &&
@@ -849,17 +867,6 @@ get_object_with_rid_ready_cb (GObject *source_object, GAsyncResult *result, gpoi
return;
}
- if (error) {
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
- g_error_free (error);
- find_cal_update_ui (fd, cal_client);
- decrease_find_data (fd);
- return;
- }
-
- g_error_free (error);
- }
-
if (fd->rid && *fd->rid) {
e_cal_client_get_object (cal_client, fd->uid, NULL, fd->cancellable, get_object_without_rid_ready_cb, fd);
return;
@@ -881,7 +888,8 @@ get_object_list_ready_cb (GObject *source_object, GAsyncResult *result, gpointer
objects = NULL;
if (error) {
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
+ if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_error_free (error);
decrease_find_data (fd);
return;
@@ -910,7 +918,8 @@ find_cal_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_
source = E_SOURCE (source_object);
if (!e_client_utils_open_new_finish (source, result, &client, &error)) {
- if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) {
+ if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED) ||
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_error_free (error);
decrease_find_data (fd);
return;