pidgin: 3c508fc9: Hopefully provide better debug logs when...
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Thu Jul 9 22:50:39 EDT 2009
-----------------------------------------------------------------
Revision: 3c508fc986ddf74e5d952a5ddf70cb5bf7a8fba4
Ancestor: f139385141b58d312c5410c33e908cabe63993e4
Author: nosnilmot at pidgin.im
Date: 2009-07-10T02:47:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3c508fc986ddf74e5d952a5ddf70cb5bf7a8fba4
Modified files:
pidgin/plugins/gevolution/add_buddy_dialog.c
pidgin/plugins/gevolution/assoc-buddy.c
pidgin/plugins/gevolution/eds-utils.c
pidgin/plugins/gevolution/gevo-util.c
pidgin/plugins/gevolution/gevolution.c
ChangeLog:
Hopefully provide better debug logs when gevolution plugin can't open the
addressbook for whatever reason.
-------------- next part --------------
============================================================
--- pidgin/plugins/gevolution/add_buddy_dialog.c 8b7b1d419dbb94456f525e955de8b610fbcce991
+++ pidgin/plugins/gevolution/add_buddy_dialog.c e88b6c033e6c53b38257d6111dc688ec03dee339
@@ -234,6 +234,7 @@ populate_treeview(GevoAddBuddyDialog *di
EBook *book;
gboolean status;
GList *cards, *c;
+ GError *err = NULL;
if (dialog->book != NULL)
{
@@ -250,10 +251,11 @@ populate_treeview(GevoAddBuddyDialog *di
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;
}
============================================================
--- pidgin/plugins/gevolution/assoc-buddy.c 7be281a7bc874409c9aad39256eaec4657d446d7
+++ pidgin/plugins/gevolution/assoc-buddy.c 31d22ea28190c92fc912e0ab73853b69d7cf1b37
@@ -138,6 +138,7 @@ populate_treeview(GevoAssociateBuddyDial
const char *prpl_id;
gboolean status;
GList *cards, *c;
+ GError *err = NULL;
if (dialog->book != NULL)
{
@@ -154,10 +155,11 @@ populate_treeview(GevoAssociateBuddyDial
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;
}
============================================================
--- pidgin/plugins/gevolution/eds-utils.c bd53c87b8816ece3aee8c90d01d65a0238888bba
+++ pidgin/plugins/gevolution/eds-utils.c 1ae279f700f9001a46911e2d8e02ea86f7667091
@@ -119,11 +119,13 @@ gevo_run_query_in_uri(const gchar *uri,
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;
}
============================================================
--- pidgin/plugins/gevolution/gevo-util.c 19d17bec2e9d47b2fbe2bea46535aeb79a15a0cc
+++ pidgin/plugins/gevolution/gevo-util.c d0cffc6391abe27bb758eb0f777b2405be054511
@@ -143,12 +143,17 @@ gevo_load_addressbook(const gchar* uri,
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)
{
g_object_unref(*book);
============================================================
--- pidgin/plugins/gevolution/gevolution.c 4d41a015d000defb7562bdb8a2dd905256b64033
+++ pidgin/plugins/gevolution/gevolution.c 5114a0c39570b9f61feef4de54745a63716b8d9e
@@ -298,12 +298,18 @@ load_timeout(gpointer data)
{
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("");
More information about the Commits
mailing list