Mercurial > pidgin.yaz
diff plugins/gevolution/gevo-util.c @ 9046:c307cf4c84d2
[gaim-migrate @ 9822]
The gevolution plugin should now compile with both the previous release of
Evolution/e-d-s and with e-d-s CVS.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 23 May 2004 22:43:37 +0000 |
parents | 8b62cc40069b |
children | 61b33ac58669 |
line wrap: on
line diff
--- a/plugins/gevolution/gevo-util.c Sun May 23 22:17:38 2004 +0000 +++ b/plugins/gevolution/gevo-util.c Sun May 23 22:43:37 2004 +0000 @@ -24,6 +24,8 @@ #include <libebook/e-book.h> +#include "gevolution.h" + void gevo_add_buddy(GaimAccount *account, const char *group_name, const char *screenname, const char *alias) @@ -129,15 +131,22 @@ gboolean gevo_load_addressbook(EBook **book, GError **error) { - gboolean result; + gboolean result = FALSE; g_return_val_if_fail(book != NULL, FALSE); +#if EBOOK_CHECK_VERSION(0, 0, 93) + *book = e_book_new_system_addressbook(NULL); + + if (book != NULL) + result = e_book_open(*book, FALSE, NULL); +#else *book = e_book_new(); - result = e_book_load_local_addressbook (*book, error); + result = e_book_load_local_addressbook(*book, error); +#endif - if (!result) + if (!result && *book != NULL) { g_object_unref(*book); *book = NULL;