From 3da4948c0fc1f2c21b163f0ec456b2d99c881258 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 Sep 2013 12:31:19 -0400 Subject: Miscellaneous cleanups. --- modules/addressbook/e-book-shell-view-actions.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'modules/addressbook') diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index d2fe86e0ca..125f3c36d6 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -212,17 +212,22 @@ address_book_refresh_done_cb (GObject *source_object, client = E_CLIENT (source_object); - if (!e_client_refresh_finish (client, result, &error)) { - ESource *source = e_client_get_source (client); + e_client_refresh_finish (client, result, &error); - if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) && - !g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_CANCELLED)) - g_warning ( - "%s: Failed to refresh '%s', %s", - G_STRFUNC, e_source_get_display_name (source), - error ? error->message : "Unknown error"); + if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + g_error_free (error); + + } else if (error != NULL) { + ESource *source; + + source = e_client_get_source (client); - g_clear_error (&error); + g_warning ( + "%s: Failed to refresh '%s', %s", + G_STRFUNC, e_source_get_display_name (source), + error ? error->message : "Unknown error"); + + g_error_free (error); } } @@ -267,7 +272,7 @@ contact_editor_contact_modified_cb (EABEditor *editor, EContactMap *map; const gchar *contact_uid; - if (error) { + if (error != NULL) { g_warning ("Error modifying contact: %s", error->message); return; } -- cgit v1.2.3