[evolution-data-server/openismus-work-master: 8/8] Readjust patch for EBookClient



commit 949b162148836f6122380ea380b97ed46c75c18b
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Thu Feb 14 23:19:31 2013 +0900

    Readjust patch for EBookClient

 addressbook/libebook/e-book-client.c |   29 +----------------------------
 1 files changed, 1 insertions(+), 28 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index f55ff57..08767cb 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -53,9 +53,9 @@ typedef struct _ConnectClosure ConnectClosure;
 typedef struct _RunInThreadClosure RunInThreadClosure;
 
 struct _EBookClientPrivate {
+       GMainContext *main_context;
        EDBusAddressBook *dbus_proxy;
        EDataBook *direct_book;
-       GMainContext *main_context;
        guint name_watcher_id;
 
        gulong dbus_proxy_error_handler_id;
@@ -106,13 +106,6 @@ G_DEFINE_TYPE_WITH_CODE (
                e_book_client_async_initable_init))
 
 static void
-set_proxy_gone_error (GError **error)
-{
-       /* do not translate this string, it should ideally never happen */
-       g_set_error_literal (error, E_CLIENT_ERROR, E_CLIENT_ERROR_DBUS_ERROR, "D-Bus book proxy gone");
-}
-
-static void
 async_context_free (AsyncContext *async_context)
 {
        if (async_context->contact != NULL)
@@ -843,11 +836,6 @@ book_client_open_sync (EClient *client,
 
        book_client = E_BOOK_CLIENT (client);
 
-       if (book_client->priv->dbus_proxy == NULL) {
-               set_proxy_gone_error (error);
-               return FALSE;
-       }
-
        return e_dbus_address_book_call_open_sync (
                book_client->priv->dbus_proxy, cancellable, error);
 }
@@ -2787,11 +2775,6 @@ e_book_client_get_contact_sync (EBookClient *client,
        if (client->priv->direct_book)
                return e_data_book_get_contact_sync (client->priv->direct_book, uid, out_contact, 
cancellable, error);
 
-       if (client->priv->dbus_proxy == NULL) {
-               set_proxy_gone_error (error);
-               return FALSE;
-       }
-
        utf8_uid = e_util_utf8_make_valid (uid);
 
        success = e_dbus_address_book_call_get_contact_sync (
@@ -2984,11 +2967,6 @@ e_book_client_get_contacts_sync (EBookClient *client,
                return e_data_book_get_contacts_sync (client->priv->direct_book,
                                                      sexp, out_contacts, cancellable, error);
 
-       if (client->priv->dbus_proxy == NULL) {
-               set_proxy_gone_error (error);
-               return FALSE;
-       }
-
        utf8_sexp = e_util_utf8_make_valid (sexp);
 
        success = e_dbus_address_book_call_get_contact_list_sync (
@@ -3192,11 +3170,6 @@ e_book_client_get_contacts_uids_sync (EBookClient *client,
                               client->priv->direct_book, sexp, 
                               out_contact_uids, cancellable, error);
 
-       if (client->priv->dbus_proxy == NULL) {
-               set_proxy_gone_error (error);
-               return FALSE;
-       }
-
        utf8_sexp = e_util_utf8_make_valid (sexp);
 
        success = e_dbus_address_book_call_get_contact_list_uids_sync (


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