Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
9045:38d022e5eb19 | 9046:c307cf4c84d2 |
---|---|
21 #include "gtkinternal.h" | 21 #include "gtkinternal.h" |
22 #include "gtkblist.h" | 22 #include "gtkblist.h" |
23 #include "gtkutils.h" | 23 #include "gtkutils.h" |
24 | 24 |
25 #include <libebook/e-book.h> | 25 #include <libebook/e-book.h> |
26 | |
27 #include "gevolution.h" | |
26 | 28 |
27 void | 29 void |
28 gevo_add_buddy(GaimAccount *account, const char *group_name, | 30 gevo_add_buddy(GaimAccount *account, const char *group_name, |
29 const char *screenname, const char *alias) | 31 const char *screenname, const char *alias) |
30 { | 32 { |
127 } | 129 } |
128 | 130 |
129 gboolean | 131 gboolean |
130 gevo_load_addressbook(EBook **book, GError **error) | 132 gevo_load_addressbook(EBook **book, GError **error) |
131 { | 133 { |
132 gboolean result; | 134 gboolean result = FALSE; |
133 | 135 |
134 g_return_val_if_fail(book != NULL, FALSE); | 136 g_return_val_if_fail(book != NULL, FALSE); |
135 | 137 |
138 #if EBOOK_CHECK_VERSION(0, 0, 93) | |
139 *book = e_book_new_system_addressbook(NULL); | |
140 | |
141 if (book != NULL) | |
142 result = e_book_open(*book, FALSE, NULL); | |
143 #else | |
136 *book = e_book_new(); | 144 *book = e_book_new(); |
137 | 145 |
138 result = e_book_load_local_addressbook (*book, error); | 146 result = e_book_load_local_addressbook(*book, error); |
147 #endif | |
139 | 148 |
140 if (!result) | 149 if (!result && *book != NULL) |
141 { | 150 { |
142 g_object_unref(*book); | 151 g_object_unref(*book); |
143 *book = NULL; | 152 *book = NULL; |
144 } | 153 } |
145 | 154 |