From c2160221e6d637a14f6e335366e8a8c00fbfa7f3 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 12 Sep 2002 00:14:11 +0000 Subject: [ fixes the other half of #17336 ] parse the name when we're asked to set 2002-09-11 Chris Toshok [ fixes the other half of #17336 ] * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name): parse the name when we're asked to set it, so the full name doesn't get stored as (potentially) "Last, First" in the card. svn path=/trunk/; revision=18051 --- addressbook/gui/contact-editor/e-contact-quick-add.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index f36d0b101e..80687e1e0a 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -94,18 +94,21 @@ quick_add_unref (QuickAdd *qa) static void quick_add_set_name (QuickAdd *qa, const gchar *name) { - ECardSimple *simple; + ECardName *card_name; if (name == qa->name) return; g_free (qa->name); - qa->name = g_strdup (name); - simple = e_card_simple_new (qa->card); - e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_FULL_NAME, name); - e_card_simple_sync_card (simple); - gtk_object_unref (GTK_OBJECT (simple)); + card_name = e_card_name_from_string (name); + qa->name = e_card_name_to_string (card_name); + + gtk_object_set (GTK_OBJECT (qa->card), + "full_name", qa->name, + NULL); + + e_card_name_unref (card_name); } static void -- cgit v1.2.3