diff options
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-table-adapter.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index a4440155d9..356aabdf8f 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -31,7 +31,7 @@ #include <libxml/xmlmemory.h> struct _EAddressbookTableAdapterPrivate { - EABModel *model; + EAddressbookModel *model; int create_contact_id, remove_contact_id, modify_contact_id, model_changed_id; @@ -100,7 +100,7 @@ addressbook_row_count (ETableModel *etc) EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; - return eab_model_contact_count (priv->model); + return e_addressbook_model_contact_count (priv->model); } /* This function returns the value at a particular point in our ETableModel. */ @@ -111,10 +111,10 @@ addressbook_value_at (ETableModel *etc, int col, int row) EAddressbookTableAdapterPrivate *priv = adapter->priv; const char *value; - if ( col >= COLS || row >= eab_model_contact_count (priv->model) ) + if ( col >= COLS || row >= e_addressbook_model_contact_count (priv->model) ) return NULL; - value = e_contact_get_const((EContact*)eab_model_contact_at (priv->model, row), col); + value = e_contact_get_const((EContact*)e_addressbook_model_contact_at (priv->model, row), col); if (value && *value && (col == E_CONTACT_EMAIL_1 || col == E_CONTACT_EMAIL_2 || col == E_CONTACT_EMAIL_3)) { char *val = g_hash_table_lookup (priv->emails, value); @@ -156,13 +156,13 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) EAddressbookTableAdapter *adapter = EAB_TABLE_ADAPTER(etc); EAddressbookTableAdapterPrivate *priv = adapter->priv; - if (eab_model_editable (priv->model)) { + if (e_addressbook_model_get_editable (priv->model)) { EContact *contact; - if (col >= COLS || row >= eab_model_contact_count (priv->model)) + if (col >= COLS || row >= e_addressbook_model_contact_count (priv->model)) return; - contact = eab_model_get_contact (priv->model, row); + contact = e_addressbook_model_get_contact (priv->model, row); if (!contact) return; @@ -177,7 +177,7 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val) } e_contact_set(contact, col, (void *) val); - eab_merging_book_commit_contact (eab_model_get_ebook (priv->model), + eab_merging_book_commit_contact (e_addressbook_model_get_book (priv->model), contact, contact_modified_cb, etc); g_object_unref (contact); @@ -196,12 +196,12 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row) EAddressbookTableAdapterPrivate *priv = adapter->priv; const EContact *contact; - if (row >= 0 && row < eab_model_contact_count (priv->model)) - contact = eab_model_contact_at (priv->model, row); + if (row >= 0 && row < e_addressbook_model_contact_count (priv->model)) + contact = e_addressbook_model_contact_at (priv->model, row); else contact = NULL; - if (!eab_model_editable(priv->model)) + if (!e_addressbook_model_editable(priv->model)) return FALSE; else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST)) /* we only allow editing of the name and file as for @@ -229,7 +229,7 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row) e_contact_set (contact, col, (void *) val); } - eab_merging_book_add_contact (eab_model_get_ebook (priv->model), contact, NULL, NULL); + eab_merging_book_add_contact (e_addressbook_model_get_book (priv->model), contact, NULL, NULL); g_object_unref (contact); } @@ -304,7 +304,7 @@ eab_table_adapter_init (GObject *object) static void -create_contact (EABModel *model, +create_contact (EAddressbookModel *model, gint index, gint count, EAddressbookTableAdapter *adapter) { @@ -313,7 +313,7 @@ create_contact (EABModel *model, } static void -remove_contacts (EABModel *model, +remove_contacts (EAddressbookModel *model, gpointer data, EAddressbookTableAdapter *adapter) { @@ -331,7 +331,7 @@ remove_contacts (EABModel *model, } static void -modify_contact (EABModel *model, +modify_contact (EAddressbookModel *model, gint index, EAddressbookTableAdapter *adapter) { @@ -343,7 +343,7 @@ modify_contact (EABModel *model, } static void -model_changed (EABModel *model, +model_changed (EAddressbookModel *model, EAddressbookTableAdapter *adapter) { /* clear whole cache */ @@ -379,7 +379,7 @@ eab_table_adapter_get_type (void) void eab_table_adapter_construct (EAddressbookTableAdapter *adapter, - EABModel *model) + EAddressbookModel *model) { EAddressbookTableAdapterPrivate *priv = adapter->priv; @@ -407,7 +407,7 @@ eab_table_adapter_construct (EAddressbookTableAdapter *adapter, } ETableModel * -eab_table_adapter_new (EABModel *model) +eab_table_adapter_new (EAddressbookModel *model) { EAddressbookTableAdapter *et; |