Make the pre_changes and changes match here.
2001-10-31 Christopher James Lahey <clahey@ximian.com> * gui/component/e-cardlist-model.c, gui/component/select-names/e-select-names-table-model.c, gui/widgets/e-addressbook-table-adapter.c: Make the pre_changes and changes match here. svn path=/trunk/; revision=14526
This commit is contained in:
committed by
Chris Lahey
parent
a3dfed7a8e
commit
2cfc5ae7ae
@ -1,3 +1,10 @@
|
||||
2001-10-31 Christopher James Lahey <clahey@ximian.com>
|
||||
|
||||
* gui/component/e-cardlist-model.c,
|
||||
gui/component/select-names/e-select-names-table-model.c,
|
||||
gui/widgets/e-addressbook-table-adapter.c: Make the pre_changes
|
||||
and changes match here.
|
||||
|
||||
2001-10-31 Jon Trowbridge <trow@ximian.com>
|
||||
|
||||
* gui/component/select-names/e-select-names.c
|
||||
|
||||
@ -63,6 +63,7 @@ e_cardlist_model_set_value_at (ETableModel *etc, int col, int row, const void *v
|
||||
ECard *card;
|
||||
if ( col >= E_CARD_SIMPLE_FIELD_LAST - 1|| row >= e_cardlist_model->data_count )
|
||||
return;
|
||||
e_table_model_pre_change(etc);
|
||||
e_card_simple_set(e_cardlist_model->data[row],
|
||||
col + 1,
|
||||
val);
|
||||
@ -129,6 +130,7 @@ e_cardlist_model_add(ECardlistModel *model,
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
e_table_model_pre_change(E_TABLE_MODEL(model));
|
||||
gtk_object_ref(GTK_OBJECT(cards[i]));
|
||||
model->data[model->data_count++] = e_card_simple_new (cards[i]);
|
||||
e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1);
|
||||
@ -143,6 +145,7 @@ e_cardlist_model_remove(ECardlistModel *model,
|
||||
int i;
|
||||
for ( i = 0; i < model->data_count; i++) {
|
||||
if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) {
|
||||
e_table_model_pre_change(E_TABLE_MODEL(model));
|
||||
gtk_object_unref(GTK_OBJECT(model->data[i]));
|
||||
memmove(model->data + i, model->data + i + 1, (model->data_count - i - 1) * sizeof (ECard *));
|
||||
e_table_model_row_deleted(E_TABLE_MODEL(model), i);
|
||||
|
||||
@ -265,6 +265,7 @@ static void
|
||||
e_select_names_table_model_model_changed (ESelectNamesModel *source,
|
||||
ESelectNamesTableModel *model)
|
||||
{
|
||||
e_table_model_pre_change(E_TABLE_MODEL(model));
|
||||
clear_info(model);
|
||||
e_table_model_changed(E_TABLE_MODEL(model));
|
||||
}
|
||||
|
||||
@ -150,6 +150,8 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
|
||||
if ( col >= COLS|| row >= e_addressbook_model_card_count (priv->model) )
|
||||
return;
|
||||
|
||||
e_table_model_pre_change(etc);
|
||||
|
||||
e_card_simple_set(priv->simples[row],
|
||||
col,
|
||||
val);
|
||||
@ -334,6 +336,7 @@ static void
|
||||
model_changed (EAddressbookModel *model,
|
||||
EAddressbookTableAdapter *adapter)
|
||||
{
|
||||
e_table_model_pre_change (E_TABLE_MODEL (adapter));
|
||||
build_simple_mapping (adapter);
|
||||
e_table_model_changed (E_TABLE_MODEL (adapter));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user