[evolution-ews] Use G_IO_ERROR_CANCELLED instead of EWS_CONNECTION_ERROR_CANCELLED



commit 2f41029324d0d0e68caa2cbc911e982b48440f5e
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 30 12:30:02 2014 +0100

    Use G_IO_ERROR_CANCELLED instead of EWS_CONNECTION_ERROR_CANCELLED
    
    The first is checked for on many places in the UI, while the later
    is not checked anywhere. The outcome was that a cancelled operation
    added a warning in the UI about "Operation Cancelled", which is
    useless.

 src/addressbook/e-book-backend-ews.c |    2 --
 src/calendar/e-cal-backend-ews.c     |    2 --
 src/server/e-ews-connection.c        |    4 ++--
 src/server/ews-errors.h              |    1 -
 4 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index 7e7c2b5..5b35820 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -191,8 +191,6 @@ convert_error_to_edb_error (GError **perror)
                case EWS_CONNECTION_ERROR_AUTHENTICATION_FAILED:
                        error = EDB_ERROR_EX (AUTHENTICATION_FAILED, (*perror)->message);
                        break;
-               case EWS_CONNECTION_ERROR_CANCELLED:
-                       break;
                case EWS_CONNECTION_ERROR_FOLDERNOTFOUND:
                case EWS_CONNECTION_ERROR_MANAGEDFOLDERNOTFOUND:
                case EWS_CONNECTION_ERROR_PARENTFOLDERNOTFOUND:
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 8ad7a1c..5f502c4 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -190,8 +190,6 @@ convert_error_to_edc_error (GError **perror)
                case EWS_CONNECTION_ERROR_AUTHENTICATION_FAILED:
                        error = EDC_ERROR_EX (AuthenticationFailed, (*perror)->message);
                        break;
-               case EWS_CONNECTION_ERROR_CANCELLED:
-                       break;
                case EWS_CONNECTION_ERROR_FOLDERNOTFOUND:
                case EWS_CONNECTION_ERROR_MANAGEDFOLDERNOTFOUND:
                case EWS_CONNECTION_ERROR_PARENTFOLDERNOTFOUND:
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 117f3bb..05a96ee 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -736,8 +736,8 @@ ews_cancel_request (GCancellable *cancellable,
 
        g_simple_async_result_set_error (
                simple,
-               EWS_CONNECTION_ERROR,
-               EWS_CONNECTION_ERROR_CANCELLED,
+               G_IO_ERROR,
+               G_IO_ERROR_CANCELLED,
                _("Operation Cancelled"));
        if (found) {
                ews_connection_schedule_cancel_message (cnc, SOUP_MESSAGE (msg));
diff --git a/src/server/ews-errors.h b/src/server/ews-errors.h
index 93a3331..fc48ead 100644
--- a/src/server/ews-errors.h
+++ b/src/server/ews-errors.h
@@ -299,7 +299,6 @@ enum {
        EWS_CONNECTION_ERROR_WIN32INTEROPERROR,
        /* Below this point are no longer direct translations of EWS errors */
        EWS_CONNECTION_ERROR_NORESPONSE,
-       EWS_CONNECTION_ERROR_CANCELLED,
        EWS_CONNECTION_ERROR_AUTHENTICATION_FAILED,
        EWS_CONNECTION_ERROR_UNKNOWN
 };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]