From: Tollef Fog Heen Date: Wed, 29 Oct 2008 16:27:39 +0000 (+0100) Subject: Make it possible to add emails to a contact X-Git-Tag: 0.5~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41c8a8fa867cd724c1735aae2c0d284b4d095bdf;p=eweouz Make it possible to add emails to a contact Make passing --emails= delete the list of emails, otherwise append to the list of emails. --- diff --git a/src/eweouz-write-addressbook.c b/src/eweouz-write-addressbook.c index 33bcaff..45be78e 100644 --- a/src/eweouz-write-addressbook.c +++ b/src/eweouz-write-addressbook.c @@ -152,6 +152,14 @@ int main(int argc, char **argv) if (emails != NULL) { gchar **head = emails; GList *el = NULL; + + if (*head[0] == '\0') { + printf("removing all emails\n"); + head++; + } else { + g_object_get(E_CONTACT(c->data), "email", &el, NULL); + } + while (*head != NULL) { printf("appending %s\n", *head); el = g_list_prepend(el, *head);