comparison plugins/gevolution/gevo-util.c @ 8474:8b62cc40069b

[gaim-migrate @ 9207] A gevolution patch from Chris Toshok of Evolution fame: "Just a couple of small patches, noticed a g_warning when adding a new contact, and we've changed the uri for the personal (local) addressbook, but there's an api call to load it." committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 19 Mar 2004 20:07:11 +0000
parents 35db601609e3
children c307cf4c84d2
comparison
equal deleted inserted replaced
8473:12fe38c195a6 8474:8b62cc40069b
127 } 127 }
128 128
129 gboolean 129 gboolean
130 gevo_load_addressbook(EBook **book, GError **error) 130 gevo_load_addressbook(EBook **book, GError **error)
131 { 131 {
132 char *filename;
133 char *uri;
134 gboolean result; 132 gboolean result;
135 133
136 g_return_val_if_fail(book != NULL, FALSE); 134 g_return_val_if_fail(book != NULL, FALSE);
137 135
138 *book = e_book_new(); 136 *book = e_book_new();
139 137
140 filename = g_build_filename(g_get_home_dir(), 138 result = e_book_load_local_addressbook (*book, error);
141 ".evolution/addressbook/local/OnThisComputer/Personal", NULL);
142
143 uri = g_strdup_printf("file://%s", filename);
144
145 g_free(filename);
146
147 result = e_book_load_uri(*book, uri, FALSE, error);
148
149 g_free(uri);
150 139
151 if (!result) 140 if (!result)
152 { 141 {
153 g_object_unref(*book); 142 g_object_unref(*book);
154 *book = NULL; 143 *book = NULL;