aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-06-06 07:49:59 +0800
committerChris Lahey <clahey@src.gnome.org>2001-06-06 07:49:59 +0800
commitf699f9902b5e374070e8dd2c0fe43028f8dfb89f (patch)
treeb01a57a6d74b0c62b082409396a0c8bf1dff7b26 /addressbook/backend/ebook
parente18a8f328c6a9baa1b5b73327776c7edaa938fb5 (diff)
downloadgsoc2013-evolution-f699f9902b5e374070e8dd2c0fe43028f8dfb89f.tar.gz
gsoc2013-evolution-f699f9902b5e374070e8dd2c0fe43028f8dfb89f.tar.zst
gsoc2013-evolution-f699f9902b5e374070e8dd2c0fe43028f8dfb89f.zip
Copy dates as they come in.
2001-06-05 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card.c (e_card_set_arg): Copy dates as they come in. * backend/pas/pas-backend-file.c (pas_backend_file_changes_foreach_key, pas_backend_file_changes, pas_backend_file_process_remove_card, pas_backend_file_process_modify_card, pas_backend_file_build_all_cards_list, pas_backend_file_get_vcard, pas_backend_file_maybe_upgrade_db): memset DBTs to 0 before using them. (pas_backend_file_build_all_cards_list): Reindented. * contact-editor/contact-editor.glade: Replaced GnomeDateEdits with a custom widget that creates an EDateEdit. * contact-editor/e-contact-editor.c: Use an EDateEdit here instead of a GnomeDateEdit. svn path=/trunk/; revision=10125
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-card.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 55b91e26d7..59fa211d39 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -1688,7 +1688,12 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
break;
case ARG_BIRTH_DATE:
g_free(card->bday);
- card->bday = GTK_VALUE_POINTER(*arg);
+ if (GTK_VALUE_POINTER (*arg)) {
+ card->bday = g_new (ECardDate, 1);
+ memcpy (card->bday, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
+ } else {
+ card->bday = NULL;
+ }
break;
case ARG_URL:
g_free(card->url);
@@ -1732,7 +1737,12 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
break;
case ARG_ANNIVERSARY:
g_free(card->anniversary);
- card->anniversary = GTK_VALUE_POINTER(*arg);
+ if (GTK_VALUE_POINTER (*arg)) {
+ card->anniversary = g_new (ECardDate, 1);
+ memcpy (card->anniversary, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
+ } else {
+ card->anniversary = NULL;
+ }
break;
case ARG_MAILER:
g_free(card->mailer);