From 2e6b3c86047282e3572e74d9458d638eecd773e2 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Fri, 21 Jan 2005 08:37:52 +0000 Subject: Don't set properties on the contact immediately. (clicked_cb): Set the 2005-01-21 Hans Petter Jansson * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name) (quick_add_set_email): Don't set properties on the contact immediately. (clicked_cb): Set the properties on the contact immediately before passing it on. This way, the FULL_NAME will only be set once, and so the FILE_AS field will be updated here. svn path=/trunk/; revision=28479 --- addressbook/ChangeLog | 8 ++++++++ addressbook/gui/contact-editor/e-contact-quick-add.c | 10 +++------- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 11a537dcb6..88493e671d 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2005-01-21 Hans Petter Jansson + + * gui/contact-editor/e-contact-quick-add.c (quick_add_set_name) + (quick_add_set_email): Don't set properties on the contact immediately. + (clicked_cb): Set the properties on the contact immediately before + passing it on. This way, the FULL_NAME will only be set once, and so + the FILE_AS field will be updated here. + 2005-01-21 Sivaiah Nallagatla * gui/component/addressbook-config.c diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index a317075450..7a167dc5ff 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -98,8 +98,6 @@ quick_add_set_name (QuickAdd *qa, const gchar *name) g_free (qa->name); qa->name = g_strdup (name); - - e_contact_set (qa->contact, E_CONTACT_FULL_NAME, (char *) name); } static void @@ -110,8 +108,6 @@ quick_add_set_email (QuickAdd *qa, const gchar *email) g_free (qa->email); qa->email = g_strdup (email); - - e_contact_set (qa->contact, E_CONTACT_EMAIL_1, (char*)email); } static void @@ -242,9 +238,9 @@ clicked_cb (GtkWidget *w, gint button, gpointer closure) email = tmp; } - quick_add_set_name (qa, name); - quick_add_set_email (qa, email); - + e_contact_set (qa->contact, E_CONTACT_FULL_NAME, (char *) name ? name : ""); + e_contact_set (qa->contact, E_CONTACT_EMAIL_1, (char *) email ? email : ""); + g_free (name); g_free (email); } -- cgit