aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-editor
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-09-12 08:14:11 +0800
committerChris Toshok <toshok@src.gnome.org>2002-09-12 08:14:11 +0800
commitc2160221e6d637a14f6e335366e8a8c00fbfa7f3 (patch)
tree7c1cb51fab25423460d7786a7f6d5be24e95f072 /addressbook/gui/contact-editor
parent97c238ccd969e4945c37770f904b169c9d3248d0 (diff)
downloadgsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar.gz
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar.bz2
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar.lz
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar.xz
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.tar.zst
gsoc2013-evolution-c2160221e6d637a14f6e335366e8a8c00fbfa7f3.zip
[ fixes the other half of #17336 ] parse the name when we're asked to set
2002-09-11 Chris Toshok <toshok@ximian.com> [ 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
Diffstat (limited to 'addressbook/gui/contact-editor')
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c15
1 files changed, 9 insertions, 6 deletions
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