From: Tollef Fog Heen Date: Wed, 29 Oct 2008 16:26:50 +0000 (+0100) Subject: Add support for updating full name and email X-Git-Tag: 0.5~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=623e0e319d55c7a3763af991b7e792ed7848a00f;p=eweouz Add support for updating full name and email --- diff --git a/src/eweouz-write-addressbook.c b/src/eweouz-write-addressbook.c index aecc394..33bcaff 100644 --- a/src/eweouz-write-addressbook.c +++ b/src/eweouz-write-addressbook.c @@ -143,6 +143,12 @@ int main(int argc, char **argv) e_book_get_contacts(book, query, &contacts, &error); for (c = contacts; c; c = c->next) { + if (full_name) + g_object_set(E_CONTACT(c->data), "full-name", full_name, NULL); + + if (nickname) + g_object_set(E_CONTACT(c->data), "nickname", nickname, NULL); + if (emails != NULL) { gchar **head = emails; GList *el = NULL; @@ -152,8 +158,8 @@ int main(int argc, char **argv) head++; } g_object_set(E_CONTACT(c->data), "email", el, NULL); - e_book_commit_contact(book, E_CONTACT(c->data), &error); } + e_book_commit_contact(book, E_CONTACT(c->data), &error); } } }