aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/backend/ebook/e-card.c20
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c76
3 files changed, 57 insertions, 47 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 5f8c547b12..55adbfe9e1 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2001-10-17 Chris Toshok <toshok@ximian.com>
* backend/pas/pas-backend-file.c (pas_backend_file_upgrade_db):
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);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index c12e14dcbe..3280619f13 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -920,49 +920,49 @@ static char *list [] = {
<ETableSpecification click-to-add=\"true\" draw-grid=\"true\" _click-to-add-message=\"* Click here to add a contact *\"> \
<ETableColumn model_col= \"0\" _title=\"File As\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
<ETableColumn model_col= \"1\" _title=\"Full Name\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"3\" _title=\"Email\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"4\" _title=\"Primary Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"5\" _title=\"Assistant Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"6\" _title=\"Business Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"7\" _title=\"Callback Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"8\" _title=\"Company Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col= \"9\" _title=\"Home Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"10\" _title=\"Organization\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"11\" _title=\"Business Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"12\" _title=\"Home Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"13\" _title=\"Mobile Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"14\" _title=\"Car Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"15\" _title=\"Business Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"16\" _title=\"Home Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"17\" _title=\"Business Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"18\" _title=\"Home Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"19\" _title=\"ISDN\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"20\" _title=\"Other Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"21\" _title=\"Other Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"22\" _title=\"Pager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"23\" _title=\"Radio\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"24\" _title=\"Telex\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"25\" _title=\"TTY\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"26\" _title=\"Other Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"27\" _title=\"Email 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"28\" _title=\"Email 3\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"29\" _title=\"Web Site\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"30\" _title=\"Department\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"31\" _title=\"Office\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"32\" _title=\"Title\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"33\" _title=\"Profession\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"34\" _title=\"Manager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"35\" _title=\"Assistant\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"36\" _title=\"Nickname\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"37\" _title=\"Spouse\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"38\" _title=\"Note\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableColumn model_col=\"39\" _title=\"Free-busy URL\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"2\" _title=\"Email\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"3\" _title=\"Primary Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"4\" _title=\"Assistant Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"5\" _title=\"Business Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"6\" _title=\"Callback Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"7\" _title=\"Company Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"8\" _title=\"Home Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col= \"9\" _title=\"Organization\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"10\" _title=\"Business Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"11\" _title=\"Home Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"12\" _title=\"Mobile Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"13\" _title=\"Car Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"14\" _title=\"Business Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"15\" _title=\"Home Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"16\" _title=\"Business Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"17\" _title=\"Home Phone 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"18\" _title=\"ISDN\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"19\" _title=\"Other Phone\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"20\" _title=\"Other Fax\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"21\" _title=\"Pager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"22\" _title=\"Radio\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"23\" _title=\"Telex\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"24\" _title=\"TTY\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"25\" _title=\"Other Address\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"26\" _title=\"Email 2\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"27\" _title=\"Email 3\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"28\" _title=\"Web Site\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"29\" _title=\"Department\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"30\" _title=\"Office\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"31\" _title=\"Title\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"32\" _title=\"Profession\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"33\" _title=\"Manager\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"34\" _title=\"Assistant\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"35\" _title=\"Nickname\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"36\" _title=\"Spouse\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"37\" _title=\"Note\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
+ <ETableColumn model_col=\"38\" _title=\"Free-busy URL\" expansion=\"1.0\" minimum_width=\"75\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
<ETableState> \
<column source=\"0\"/> \
<column source=\"1\"/> \
<column source=\"5\"/> \
+ <column source=\"2\"/> \
<column source=\"3\"/> \
- <column source=\"4\"/> \
<grouping> \
<leaf column=\"0\" ascending=\"true\"/> \
</grouping> \