aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-30 22:37:55 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-30 22:37:55 +0800
commit695a9d492e4161939542844a19b7188b4a6bf99b (patch)
treee8dcb88f9e8bb2c6d94e76588c1879f6b3367216 /addressbook/backend/ebook/e-card.c
parent685a2424931709064b00465a109a253977caef05 (diff)
downloadgsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar.gz
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar.bz2
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar.lz
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar.xz
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.tar.zst
gsoc2013-evolution-695a9d492e4161939542844a19b7188b4a6bf99b.zip
Added ename includes and libs.
2000-04-30 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/Makefile.am: Added ename includes and libs. * backend/ebook/e-card.c, backend/ebook/e-card.h: Added e_card_name_from_string. Added header for e_card_delivery_address_from_string, even though it's not implemented yet. * contact-editor/Makefile.am: Removed the ename includes since we no longer use ename directly here. * contact-editor/e-contact-editor.c: Fixed this to properly save the address labels displayed. Updated this to use the function e_card_name_from_string instead of doing it by hand. * contact-editor/fullname-strings.h, contact-editor/fullname.glade: Deleted an unused field. Changed the set of prefixes and suffixes. svn path=/trunk/; revision=2689
Diffstat (limited to 'addressbook/backend/ebook/e-card.c')
-rw-r--r--addressbook/backend/ebook/e-card.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index eea5c16dc1..2f0f05b97f 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -17,6 +17,7 @@
#include <libversit/vcc.h>
#include "e-card.h"
#include "e-card-pairs.h"
+#include "e-name-western.h"
#define is_a_prop_of(obj,prop) (isAPropertyOf ((obj),(prop)))
#define str_val(obj) (the_str = (vObjectValueType (obj))? fakeCString (vObjectUStringZValue (obj)) : calloc (1, 1))
@@ -994,6 +995,23 @@ e_card_name_to_string(const ECardName *name)
return g_strjoinv(" ", strings);
}
+ECardName *
+e_card_name_from_string(const char *full_name)
+{
+ ECardName *name = g_new(ECardName, 1);
+ ENameWestern *western = e_name_western_parse (full_name);
+
+ name->prefix = g_strdup (western->prefix);
+ name->given = g_strdup (western->first );
+ name->additional = g_strdup (western->middle);
+ name->family = g_strdup (western->last );
+ name->suffix = g_strdup (western->suffix);
+
+ e_name_western_free(western);
+
+ return name;
+}
+
/*
* ECard lifecycle management and vCard loading/saving.
*/