diff options
author | Sivaiah Nallagatla <snallagatla@novell.com> | 2005-01-22 12:03:51 +0800 |
---|---|---|
committer | Sivaiah Nallagatla <siva@src.gnome.org> | 2005-01-22 12:03:51 +0800 |
commit | 59dd1b2a261be4b5ba8784ce3619f7e002c98f2f (patch) | |
tree | 9081439bd485ad7e3c294c9fdcf51e066db74a46 /addressbook/gui/widgets/e-addressbook-table-adapter.c | |
parent | 2420ae32bd6f7e9672ef84ca3f826dfa8d11a7f4 (diff) | |
download | gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar.gz gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar.bz2 gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar.lz gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar.xz gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.tar.zst gsoc2013-evolution-59dd1b2a261be4b5ba8784ce3619f7e002c98f2f.zip |
renamed the signal CONTACT_REMOVED to CONTACTS_REMOVED and chaned the
2005-01-21 Sivaiah Nallagatla <snallagatla@novell.com>
* gui/widgets/e-addressbook-model.[ch]
(eab_model_class_init) : renamed the signal
CONTACT_REMOVED to CONTACTS_REMOVED and chaned
the param type POINTER from INT
(remove_contact) : delete all the contacts
from the model and emit CONATCTS_REMOVED
signal instead of emitting it many times
* gui/widgets/e-addressbook-reflow-adpater.c
(e_addressbook_reflow_adapter_construct)
(remove_contacts) : renamed remove_contact to remove_contacts
and when number of conacts is more than 1 use _model_changed
instead of _remove_item
* gui/widgets/e-addressbook-table-adapter.c
(eab_table_adapter_construct)
(remove_contacts) : ditto
* gui/widgets/e-addressbook-view.c
(eab_view_new) :
(contacts_removed) : renamed contact_removed
to contacts_removed and traverese over indices
to find displayed contact indiex
fixes #71448
svn path=/trunk/; revision=28503
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-table-adapter.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index c3fadfdf23..a11f749523 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -258,12 +258,19 @@ create_contact (EABModel *model, } static void -remove_contact (EABModel *model, - gint index, +remove_contacts (EABModel *model, + gpointer data, EAddressbookTableAdapter *adapter) { + GArray *indices = (GArray *) data; + int count = indices->len; + + e_table_model_pre_change (E_TABLE_MODEL (adapter)); - e_table_model_rows_deleted (E_TABLE_MODEL (adapter), index, 1); + if (count == 1) + e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1); + else + e_table_model_changed (E_TABLE_MODEL (adapter)); } static void @@ -321,8 +328,8 @@ eab_table_adapter_construct (EAddressbookTableAdapter *adapter, G_CALLBACK(create_contact), adapter); priv->remove_contact_id = g_signal_connect(priv->model, - "contact_removed", - G_CALLBACK(remove_contact), + "contacts_removed", + G_CALLBACK(remove_contacts), adapter); priv->modify_contact_id = g_signal_connect(priv->model, "contact_changed", |