From 653cfffc0e00dfb59b36813c1b45c53d3f773c65 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 21 Oct 2003 18:49:34 +0000 Subject: Merge new-ui-branch to the trunk. svn path=/trunk/; revision=22965 --- .../gui/contact-list-editor/e-contact-list-model.c | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'addressbook/gui/contact-list-editor/e-contact-list-model.c') diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index 89354aaece..80bc29b7a9 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -30,7 +30,7 @@ contact_list_value_at (ETableModel *etc, int col, int row) { EContactListModel *model = E_CONTACT_LIST_MODEL (etc); - return (void *) e_destination_get_textrep (model->data[row], TRUE); + return (void *) eab_destination_get_textrep (model->data[row], TRUE); } /* This function sets the value at a particular point in our ETableModel. */ @@ -127,7 +127,7 @@ e_contact_list_model_init (GtkObject *object) model->data_alloc = 10; model->data_count = 0; - model->data = g_new (EDestination*, model->data_alloc); + model->data = g_new (EABDestination*, model->data_alloc); } GType @@ -172,16 +172,16 @@ e_contact_list_model_new () } void -e_contact_list_model_add_destination (EContactListModel *model, EDestination *dest) +e_contact_list_model_add_destination (EContactListModel *model, EABDestination *dest) { g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model)); - g_return_if_fail (E_IS_DESTINATION (dest)); + g_return_if_fail (EAB_IS_DESTINATION (dest)); e_table_model_pre_change (E_TABLE_MODEL (model)); if (model->data_count + 1 >= model->data_alloc) { model->data_alloc *= 2; - model->data = g_renew (EDestination*, model->data, model->data_alloc); + model->data = g_renew (EABDestination*, model->data, model->data_alloc); } model->data[model->data_count ++] = dest; @@ -194,28 +194,28 @@ void e_contact_list_model_add_email (EContactListModel *model, const char *email) { - EDestination *new_dest; + EABDestination *new_dest; g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model)); g_return_if_fail (email != NULL); - new_dest = e_destination_new (); - e_destination_set_email (new_dest, email); + new_dest = eab_destination_new (); + eab_destination_set_email (new_dest, email); e_contact_list_model_add_destination (model, new_dest); } void -e_contact_list_model_add_card (EContactListModel *model, - ECardSimple *simple) +e_contact_list_model_add_contact (EContactListModel *model, + EContact *contact) { - EDestination *new_dest; + EABDestination *new_dest; g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model)); - g_return_if_fail (E_IS_CARD_SIMPLE (simple)); + g_return_if_fail (E_IS_CONTACT (contact)); - new_dest = e_destination_new (); - e_destination_set_card (new_dest, simple->card, 0); /* Hard-wired for default e-mail */ + new_dest = eab_destination_new (); + eab_destination_set_contact (new_dest, contact, 0); /* Hard-wired for default e-mail */ e_contact_list_model_add_destination (model, new_dest); } @@ -229,7 +229,7 @@ e_contact_list_model_remove_row (EContactListModel *model, int row) e_table_model_pre_change (E_TABLE_MODEL (model)); g_object_unref (model->data[row]); - memmove (model->data + row, model->data + row + 1, sizeof (EDestination*) * (model->data_count - row - 1)); + memmove (model->data + row, model->data + row + 1, sizeof (EABDestination*) * (model->data_count - row - 1)); model->data_count --; e_table_model_row_deleted (E_TABLE_MODEL (model), row); @@ -255,7 +255,7 @@ e_contact_list_model_remove_all (EContactListModel *model) } -const EDestination * +const EABDestination * e_contact_list_model_get_destination (EContactListModel *model, int row) { g_return_val_if_fail (E_IS_CONTACT_LIST_MODEL (model), NULL); -- cgit v1.2.3