aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSivaiah Nallagatla <snallagatla@novell.com>2004-12-02 00:42:47 +0800
committerSivaiah Nallagatla <siva@src.gnome.org>2004-12-02 00:42:47 +0800
commit36948023ffbc80bb96bb2f9357640095bc45e409 (patch)
tree4fd3b85cf6c0b06b710d737f344384c4592169f0
parent8f27b982a364c72b819e8bd0ed6ac3a7a37c1313 (diff)
downloadgsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar
gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.gz
gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.bz2
gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.lz
gsoc2013-evolution-36948023ffbc80bb96bb2f9357640095bc45e409.tar.xz
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
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c9
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);
}