diff options
author | Chris Toshok <toshok@ximian.com> | 2001-06-29 12:31:39 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-06-29 12:31:39 +0800 |
commit | 9b19b1d618903203dbda010b82a65aa0717d183a (patch) | |
tree | d6d1cab24c66af4f60f67821808c7fba21fe8b6d /addressbook/gui/widgets/e-addressbook-table-adapter.c | |
parent | f2d683ced7a847e978a3763f91f63b943b56bbee (diff) | |
download | gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.gz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.bz2 gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.lz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.xz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.zst gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.zip |
pop up list editor for lists, contact editor otherwise.
2001-06-28 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-view.c (table_double_click): pop up
list editor for lists, contact editor otherwise.
* gui/widgets/e-minicard.c (e_minicard_event): same.
* gui/widgets/e-minicard.h (struct _EMinicard): change "editor" to
GtkOjbect, since it can be either a contact editor or contact list
editor.
* gui/widgets/e-addressbook-table-adapter.c
(addressbook_is_cell_editable): don't allow editting of any fields
except the name and file_as for lists.
svn path=/trunk/; revision=10590
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-table-adapter.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 0660bbd13a..36909ca433 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -159,7 +159,16 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row) { EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; - return e_addressbook_model_editable(priv->model) && col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; + ECard *card = e_addressbook_model_card_at (priv->model, row); + + if (!e_addressbook_model_editable(priv->model)) + return FALSE; + else if (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; + else + return col < E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING; } static void |