From 67767447ce4521136298b7f949117f0fbb6593ab Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 5 Jul 2001 13:24:54 +0000 Subject: Upped the required version of gal. 2001-07-05 Christopher James Lahey * configure.in: Upped the required version of gal. From addressbook/ChangeLog: 2001-07-05 Christopher James Lahey * gui/widgets/e-addressbook-table-adapter.c (addressbook_is_cell_editable): Check if the row is within our table and return from this function as if the card is a standard card, not a list. svn path=/trunk/; revision=10800 --- addressbook/ChangeLog | 7 +++++++ addressbook/gui/widgets/e-addressbook-table-adapter.c | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index e92c914a4f..77c4200b6c 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2001-07-05 Christopher James Lahey + + * gui/widgets/e-addressbook-table-adapter.c + (addressbook_is_cell_editable): Check if the row is within our + table and return from this function as if the card is a standard + card, not a list. + 2001-07-03 Damon Chaplin * backend/ebook/Makefile.am (evolution_vcard_importer_LDADD): diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 36909ca433..3fa92d2300 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -159,11 +159,16 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row) { EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; - ECard *card = e_addressbook_model_card_at (priv->model, row); + ECard *card; + + if (row >= 0 && row < e_addressbook_model_card_count (priv->model)) + card = e_addressbook_model_card_at (priv->model, row); + else + card = NULL; if (!e_addressbook_model_editable(priv->model)) return FALSE; - else if (e_card_evolution_list (card)) + else if (card && e_card_evolution_list (card)) /* we only allow editing of the name and file as for lists */ return col == E_CARD_SIMPLE_FIELD_FULL_NAME || col == E_CARD_SIMPLE_FIELD_FILE_AS; -- cgit v1.2.3