aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-17 16:09:12 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-17 16:09:12 +0800
commit285881f829cf38dc026f25ad4824349de8b0be24 (patch)
treeb49f1cc2c772b13bbd58b03b00adab12af7507f0 /addressbook/backend
parent9a5d75225e839204cd41865520731d6f06008a14 (diff)
downloadgsoc2013-evolution-285881f829cf38dc026f25ad4824349de8b0be24.tar.gz
gsoc2013-evolution-285881f829cf38dc026f25ad4824349de8b0be24.tar.zst
gsoc2013-evolution-285881f829cf38dc026f25ad4824349de8b0be24.zip
Did a bit of clean up here. Might fix some crashes, specifically Ximian
2001-10-17 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card.c (e_card_get_vobject): Did a bit of clean up here. Might fix some crashes, specifically Ximian bug #10164. * gui/widgets/e-addressbook-view.c (SPEC): Updated the model column numbers here. Fixes Ximian bug #12308. svn path=/trunk/; revision=13721
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-card.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 47dfdb2880..34f924d4b1 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -526,19 +526,19 @@ e_card_get_vobject (ECard *card, gboolean assumeUTF8)
addressprop = addProp(vobj, VCAdrProp);
set_address_flags (addressprop, address->flags);
- if ( address->po )
+ if (address->po)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCPostalBoxProp, address->po);
- if ( address->ext )
+ if (address->ext)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCExtAddressProp, address->ext);
- if ( address->street )
+ if (address->street)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCStreetAddressProp, address->street);
- if ( address->city )
+ if (address->city)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCCityProp, address->city);
- if ( address->region )
+ if (address->region)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCRegionProp, address->region);
- if ( address->code )
+ if (address->code)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCPostalCodeProp, address->code);
- if ( address->country )
+ if (address->country)
ADD_PROP_VALUE_SET_IS_ASCII(addressprop, VCCountryNameProp, address->country);
if (has_return)
@@ -646,7 +646,7 @@ e_card_get_vobject (ECard *card, gboolean assumeUTF8)
}
if (card->caluri)
- addPropValue(vobj, "CALURI", card->caluri);
+ addPropValueQP(vobj, "CALURI", card->caluri);
if (card->fburl)
ADD_PROP_VALUE(vobj, "FBURL", card->fburl);
@@ -729,7 +729,7 @@ e_card_get_vobject (ECard *card, gboolean assumeUTF8)
}
}
- ADD_PROP_VALUE (vobj, VCUniqueStringProp, card->id ? card->id : "");
+ addPropValueQP (vobj, VCUniqueStringProp, (card->id ? card->id : ""));
#if 0
if (crd->photo.prop.used) {
@@ -2077,6 +2077,8 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
case ARG_ID:
g_free(card->id);
card->id = g_strdup(GTK_VALUE_STRING(*arg));
+ if (card->id == NULL)
+ card->id = g_strdup ("");
break;
case ARG_LAST_USE:
g_free(card->last_use);