diff options
author | Chris Toshok <toshok@ximian.com> | 2001-06-01 05:26:19 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-06-01 05:26:19 +0800 |
commit | 6b6d9e32a4848b5fcb54ad83b681a828e6ed2a01 (patch) | |
tree | 71b62a8f580774eaf90d24d65533f60b69b56072 /addressbook/gui/widgets/e-addressbook-model.c | |
parent | e5ecf5d84ed197d93afd30fd1ce40384f01be09e (diff) | |
download | gsoc2013-evolution-6b6d9e32a4848b5fcb54ad83b681a828e6ed2a01.tar.gz gsoc2013-evolution-6b6d9e32a4848b5fcb54ad83b681a828e6ed2a01.tar.zst gsoc2013-evolution-6b6d9e32a4848b5fcb54ad83b681a828e6ed2a01.zip |
decrement data_count before emitting the card_removed signal, and break
2001-05-31 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-model.c (remove_card): decrement
data_count before emitting the card_removed signal, and break
after we've removed the matching card.
(e_addressbook_model_class_init): change signature of
"card_removed" signal to match what we emit (and what is
expected.)
* gui/widgets/e-addressbook-view.c (e_addressbook_view_init): the
signal name is "destroy", not "destroyed".
(do_remove): new function, actually remove the card.
(e_addressbook_view_delete_selection): get this working for both
view types.
svn path=/trunk/; revision=10071
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index db87e6fbaf..9183ee0831 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -142,9 +142,12 @@ remove_card(EBookView *book_view, if ( !strcmp(e_card_get_id(model->data[i]), id) ) { gtk_object_unref(GTK_OBJECT(model->data[i])); memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *)); + model->data_count--; + gtk_signal_emit (GTK_OBJECT (model), e_addressbook_model_signals [CARD_REMOVED], i); + break; } } } @@ -246,8 +249,8 @@ e_addressbook_model_class_init (GtkObjectClass *object_class) GTK_RUN_LAST, object_class->type, GTK_SIGNAL_OFFSET (EAddressbookModelClass, card_removed), - gtk_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT); + gtk_marshal_NONE__INT, + GTK_TYPE_NONE, 1, GTK_TYPE_INT); e_addressbook_model_signals [CARD_CHANGED] = gtk_signal_new ("card_changed", |