diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-07-01 12:07:26 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:08:48 +0800 |
commit | ae9db3ed236b0c734fd12c8dc8c99764626bf0b8 (patch) | |
tree | bd45389467f43a96c36172d8a925dd5df041cf5b /addressbook/gui/widgets/eab-gui-util.c | |
parent | db969c7f664d0a1d901bedd794b0c7e0762ede33 (diff) | |
download | gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.gz gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.bz2 gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.lz gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.xz gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.zst gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/gui/widgets/eab-gui-util.c')
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 7b94c85233..d910b339b4 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -374,7 +374,9 @@ struct ContactCopyProcess_ { static void process_unref (ContactCopyProcess *process); static void -remove_contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) +remove_contact_ready_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) { EBookClient *book_client = E_BOOK_CLIENT (source_object); ContactCopyProcess *process = user_data; @@ -382,8 +384,10 @@ remove_contact_ready_cb (GObject *source_object, GAsyncResult *result, gpointer e_book_client_remove_contact_by_uid_finish (book_client, result, &error); - if (error) { - g_debug ("%s: Remove contact by uid failed: %s", G_STRFUNC, error->message); + if (error != NULL) { + g_warning ( + "%s: Remove contact by uid failed: %s", + G_STRFUNC, error->message); g_error_free (error); } @@ -474,29 +478,33 @@ do_copy (gpointer data, gpointer user_data) } static void -book_loaded_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) +book_loaded_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) { ESource *destination = E_SOURCE (source_object); ContactCopyProcess *process = user_data; EClient *client = NULL; - EBookClient *book_client; GError *error = NULL; - if (!e_client_utils_open_new_finish (destination, result, &client, &error)) - client = NULL; - - book_client = client ? E_BOOK_CLIENT (client) : NULL; + e_client_utils_open_new_finish (destination, result, &client, &error); - if (book_client != NULL) { - g_warn_if_fail (error == NULL); - process->destination = book_client; - process->book_status = TRUE; - g_slist_foreach (process->contacts, do_copy, process); - } else if (error != NULL) { - g_debug ("%s: Failed to open destination client: %s", G_STRFUNC, error->message); + if (error != NULL) { + g_warn_if_fail (client == NULL); + g_warning ( + "%s: Failed to open destination client: %s", + G_STRFUNC, error->message); g_error_free (error); + goto exit; } + g_return_if_fail (E_IS_CLIENT (client)); + + process->destination = E_BOOK_CLIENT (client); + process->book_status = TRUE; + g_slist_foreach (process->contacts, do_copy, process); + +exit: process_unref (process); } |