From 41c8a8fa867cd724c1735aae2c0d284b4d095bdf Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Wed, 29 Oct 2008 17:27:39 +0100 Subject: [PATCH] Make it possible to add emails to a contact Make passing --emails= delete the list of emails, otherwise append to the list of emails. --- src/eweouz-write-addressbook.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.39.5