# HG changeset patch # User Stu Tomlinson # Date 1247194029 0 # Node ID 9e916fd25f4821c0c319b0926ebb92f8066c4786 # Parent 036d94041e09ef40eea9640dd21b9d8ffc70f7e7 Hopefully provide better debug logs when gevolution plugin can't open the addressbook for whatever reason. diff -r 036d94041e09 -r 9e916fd25f48 pidgin/plugins/gevolution/add_buddy_dialog.c --- a/pidgin/plugins/gevolution/add_buddy_dialog.c Fri Jul 10 02:26:37 2009 +0000 +++ b/pidgin/plugins/gevolution/add_buddy_dialog.c Fri Jul 10 02:47:09 2009 +0000 @@ -234,6 +234,7 @@ EBook *book; gboolean status; GList *cards, *c; + GError *err = NULL; if (dialog->book != NULL) { @@ -250,10 +251,11 @@ gtk_list_store_clear(dialog->model); - if (!gevo_load_addressbook(uri, &book, NULL)) + if (!gevo_load_addressbook(uri, &book, &err)) { purple_debug_error("evolution", - "Error retrieving default addressbook\n"); + "Error retrieving default addressbook: %s\n", err->message); + g_error_free(err); return; } diff -r 036d94041e09 -r 9e916fd25f48 pidgin/plugins/gevolution/assoc-buddy.c --- a/pidgin/plugins/gevolution/assoc-buddy.c Fri Jul 10 02:26:37 2009 +0000 +++ b/pidgin/plugins/gevolution/assoc-buddy.c Fri Jul 10 02:47:09 2009 +0000 @@ -138,6 +138,7 @@ const char *prpl_id; gboolean status; GList *cards, *c; + GError *err = NULL; if (dialog->book != NULL) { @@ -154,10 +155,11 @@ gtk_list_store_clear(dialog->model); - if (!gevo_load_addressbook(uri, &book, NULL)) + if (!gevo_load_addressbook(uri, &book, &err)) { purple_debug_error("evolution", - "Error retrieving addressbook\n"); + "Error retrieving addressbook: %s\n", err->message); + g_error_free(err); return; } diff -r 036d94041e09 -r 9e916fd25f48 pidgin/plugins/gevolution/eds-utils.c --- a/pidgin/plugins/gevolution/eds-utils.c Fri Jul 10 02:26:37 2009 +0000 +++ b/pidgin/plugins/gevolution/eds-utils.c Fri Jul 10 02:47:09 2009 +0000 @@ -119,11 +119,13 @@ EBook *book; gboolean status; GList *cards; + GError *err = NULL; - if (!gevo_load_addressbook(uri, &book, NULL)) + if (!gevo_load_addressbook(uri, &book, &err)) { purple_debug_error("evolution", - "Error retrieving addressbook\n"); + "Error retrieving addressbook: %s\n", err->message); + g_error_free(err); return NULL; } diff -r 036d94041e09 -r 9e916fd25f48 pidgin/plugins/gevolution/gevo-util.c --- a/pidgin/plugins/gevolution/gevo-util.c Fri Jul 10 02:26:37 2009 +0000 +++ b/pidgin/plugins/gevolution/gevo-util.c Fri Jul 10 02:47:09 2009 +0000 @@ -143,11 +143,16 @@ g_return_val_if_fail(book != NULL, FALSE); if (uri == NULL) - *book = e_book_new_system_addressbook(NULL); + *book = e_book_new_system_addressbook(error); else *book = e_book_new_from_uri(uri, error); - result = e_book_open(*book, FALSE, NULL); + if (*book == NULL) + return FALSE; + + *error = NULL; + + result = e_book_open(*book, FALSE, error); if (!result && *book != NULL) { diff -r 036d94041e09 -r 9e916fd25f48 pidgin/plugins/gevolution/gevolution.c --- a/pidgin/plugins/gevolution/gevolution.c Fri Jul 10 02:26:37 2009 +0000 +++ b/pidgin/plugins/gevolution/gevolution.c Fri Jul 10 02:47:09 2009 +0000 @@ -298,12 +298,18 @@ { PurplePlugin *plugin = (PurplePlugin *)data; EBookQuery *query; + GError *err = NULL; timer = 0; /* Maybe this is it? */ - if (!gevo_load_addressbook(NULL, &book, NULL)) + if (!gevo_load_addressbook(NULL, &book, &err)) + { + purple_debug_error("evolution", + "Error retrieving addressbook: %s\n", err->message); + g_error_free(err); return FALSE; + } query = e_book_query_any_field_contains("");