aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-view.c
diff options
context:
space:
mode:
authorSivaiah Nallagatla <snallagatla@novell.com>2005-01-22 12:03:51 +0800
committerSivaiah Nallagatla <siva@src.gnome.org>2005-01-22 12:03:51 +0800
commit59dd1b2a261be4b5ba8784ce3619f7e002c98f2f (patch)
tree9081439bd485ad7e3c294c9fdcf51e066db74a46 /addressbook/gui/widgets/e-addressbook-view.c
parent2420ae32bd6f7e9672ef84ca3f826dfa8d11a7f4 (diff)
downloadgsoc2013-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-view.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index dd45de4ba0..5f8397161b 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -99,7 +99,7 @@ static void stop_state_changed (GtkObject *object, EABView *eav);
static void writable_status (GtkObject *object, gboolean writable, EABView *eav);
static void backend_died (GtkObject *object, EABView *eav);
static void contact_changed (EABModel *model, gint index, EABView *eav);
-static void contact_removed (EABModel *model, gint index, EABView *eav);
+static void contacts_removed (EABModel *model, gpointer data, EABView *eav);
static GList *get_selected_contacts (EABView *view);
static void command_state_change (EABView *eav);
@@ -436,8 +436,8 @@ eab_view_new (void)
G_CALLBACK (backend_died), eav);
g_signal_connect (eav->model, "contact_changed",
G_CALLBACK (contact_changed), eav);
- g_signal_connect (eav->model, "contact_removed",
- G_CALLBACK (contact_removed), eav);
+ g_signal_connect (eav->model, "contacts_removed",
+ G_CALLBACK (contacts_removed), eav);
eav->editable = FALSE;
eav->query = g_strdup (SHOW_ALL_SEARCH);
@@ -1189,13 +1189,23 @@ contact_changed (EABModel *model, gint index, EABView *eav)
}
static void
-contact_removed (EABModel *model, gint index, EABView *eav)
+contacts_removed (EABModel *model, gpointer data, EABView *eav)
{
- if (eav->displayed_contact == index) {
- /* if the contact that's presently displayed is changed, clear the display */
- eab_contact_display_render (EAB_CONTACT_DISPLAY (eav->contact_display), NULL,
- EAB_CONTACT_DISPLAY_RENDER_NORMAL);
- eav->displayed_contact = -1;
+ GArray *indices = (GArray *) data;
+ int count = indices->len;
+ gint i;
+
+ for (i = 0; i < count; i ++) {
+
+
+ if (eav->displayed_contact == g_array_index (indices, gint, i)) {
+
+ /* if the contact that's presently displayed is changed, clear the display */
+ eab_contact_display_render (EAB_CONTACT_DISPLAY (eav->contact_display), NULL,
+ EAB_CONTACT_DISPLAY_RENDER_NORMAL);
+ eav->displayed_contact = -1;
+ break;
+ }
}
}