Mercurial > pidgin.yaz
changeset 9566:7a149eac59a3
[gaim-migrate @ 10409]
Patch by Henry Jen (bug #992152) to the gevolution plugin. He states:
"After associated a buddy with an existing contact, the IM information is
not appearing in the contact when view from evolution."
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 20 Jul 2004 00:10:36 +0000 |
parents | c60809a33460 |
children | 111394c5fe2a |
files | COPYRIGHT plugins/gevolution/add_buddy_dialog.c plugins/gevolution/assoc-buddy.c plugins/gevolution/gevolution.h |
diffstat | 4 files changed, 21 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Mon Jul 19 16:35:33 2004 +0000 +++ b/COPYRIGHT Tue Jul 20 00:10:36 2004 +0000 @@ -69,6 +69,7 @@ Casey Ho Iain Holmes Karsten Huneycutt +Henry Jen Akuke Kok Cole Kowalski Gary Kramlich
--- a/plugins/gevolution/add_buddy_dialog.c Mon Jul 19 16:35:33 2004 +0000 +++ b/plugins/gevolution/add_buddy_dialog.c Tue Jul 20 00:10:36 2004 +0000 @@ -124,7 +124,7 @@ GtkWidget *menu; #if notyet ESourceList *addressbooks; - GList *groups, *g; + GSList *groups, *g; #endif menu = @@ -147,7 +147,7 @@ return; } - groups = e_source_list_peek_groups(list); + groups = e_source_list_peek_groups(addressbooks); if (groups == NULL) { @@ -160,13 +160,13 @@ for (g = groups; g != NULL; g = g->next) { - GList *sources, *s; + GSList *sources, *s; sources = e_source_group_peek_sources(g->data); - for (p = sources; p != NULL; p = p->next) + for (s = sources; s != NULL; s = s->next) { - ESource *source = E_SOURCE(p->data); + ESource *source = E_SOURCE(s->data); item = gtk_menu_item_new_with_label(e_source_peek_name(source)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
--- a/plugins/gevolution/assoc-buddy.c Mon Jul 19 16:35:33 2004 +0000 +++ b/plugins/gevolution/assoc-buddy.c Tue Jul 20 00:10:36 2004 +0000 @@ -62,7 +62,7 @@ GtkWidget *menu; #if notyet ESourceList *addressbooks; - GList *groups, *g; + GSList *groups, *g; #endif menu = @@ -85,7 +85,7 @@ return; } - groups = e_source_list_peek_groups(list); + groups = e_source_list_peek_groups(addressbooks); if (groups == NULL) { @@ -98,13 +98,13 @@ for (g = groups; g != NULL; g = g->next) { - GList *sources, *s; + GSList *sources, *s; sources = e_source_group_peek_sources(g->data); - for (p = sources; p != NULL; p = p->next) + for (s = sources; s != NULL; s = s->next) { - ESource *source = E_SOURCE(p->data); + ESource *source = E_SOURCE(s->data); item = gtk_menu_item_new_with_label(e_source_peek_name(source)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); @@ -294,7 +294,7 @@ { GtkTreeSelection *selection; GtkTreeIter iter; - GList *list, *new_list = NULL, *l; + GList *list; const char *fullname; EContactField protocol_field; EContact *contact; @@ -315,17 +315,17 @@ list = e_contact_get(contact, protocol_field); - /* Make a copy of the list */ - for (l = list; l != NULL; l = l->next) - new_list = g_list_append(new_list, g_strdup((char *)l->data)); + list = g_list_append(list, g_strdup(dialog->buddy->name)); - new_list = g_list_append(new_list, dialog->buddy->name); - - e_contact_set(contact, protocol_field, new_list); + e_contact_set(contact, protocol_field, list); + if (!e_book_commit_contact(dialog->book, contact, NULL)) + { + gaim_debug_error("evolution", "Error adding contact to book\n"); + } /* Free the list. */ - g_list_foreach(new_list, (GFunc)g_free, NULL); - g_list_free(new_list); + g_list_foreach(list, (GFunc)g_free, NULL); + g_list_free(list); delete_win_cb(NULL, NULL, dialog); }
--- a/plugins/gevolution/gevolution.h Mon Jul 19 16:35:33 2004 +0000 +++ b/plugins/gevolution/gevolution.h Tue Jul 20 00:10:36 2004 +0000 @@ -33,7 +33,7 @@ #include <libebook/e-book.h> -#if !EBOOK_CHECK_VERSION(0, 0, 95) +#if 0 && !EBOOK_CHECK_VERSION(0, 0, 95) # include <libebook/e-book-async.h> #endif