diff options
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 9f3bbf5ea6..c6792eb0e0 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +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 + + 2004-11-28 Sivaiah Nallagatla <snallagatla@novell.com> * gui/contact-editor/e-contact-editor.h : Define 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); } |