diff options
author | Sivaiah Nallagatla <snallagatla@novell.com> | 2004-12-02 00:42:47 +0800 |
---|---|---|
committer | Sivaiah Nallagatla <siva@src.gnome.org> | 2004-12-02 00:42:47 +0800 |
commit | 36948023ffbc80bb96bb2f9357640095bc45e409 (patch) | |
tree | 4fd3b85cf6c0b06b710d737f344384c4592169f0 /addressbook/gui | |
parent | 8f27b982a364c72b819e8bd0ed6ac3a7a37c1313 (diff) | |
download | gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.gz gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.zst gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.zip |
save the uid and set it again in the contact. Otherwise, there is
2004-12-01 Sivaiah Nallagatla <snallagatla@novell.com>
* gui/contact-editor/e-contact-editor.c (save_contact) :
save the uid and set it again in the contact. Otherwise, there is
possibility we trying to save the contact wiht out UID, as we destory the
contact and create new one when data is wrong
svn path=/trunk/; revision=28033
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index d74b78b9f7..3bd1780a05 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2741,6 +2741,8 @@ real_save_contact (EContactEditor *ce, gboolean should_close) static void save_contact (EContactEditor *ce, gboolean should_close) { + char *uid; + if (!ce->target_book) return; @@ -2752,11 +2754,16 @@ save_contact (EContactEditor *ce, gboolean should_close) extract_all (ce); if (!e_contact_editor_is_valid (EAB_EDITOR (ce))) { + uid = e_contact_get (ce->contact, E_CONTACT_UID); g_object_unref (ce->contact); ce->contact = e_contact_new (); + if (uid) { + e_contact_set (ce->contact, E_CONTACT_UID, uid); + g_free (uid); + } return; } - + real_save_contact (ce, should_close); } |