diff options
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-completion.c')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-completion.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c index eb15c4f232..cbfc1d56c6 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -55,7 +55,7 @@ typedef struct { struct _ESelectNamesCompletionPrivate { - ESelectNamesModel *model; + ESelectNamesTextModel *text_model; GList *book_data; gint books_not_ready; @@ -739,8 +739,8 @@ e_select_names_completion_destroy (GtkObject *object) ESelectNamesCompletion *comp = E_SELECT_NAMES_COMPLETION (object); GList *l; - if (comp->priv->model) - gtk_object_unref (GTK_OBJECT (comp->priv->model)); + if (comp->priv->text_model) + gtk_object_unref (GTK_OBJECT (comp->priv->text_model)); for (l = comp->priv->book_data; l; l = l->next) { ESelectNamesCompletionBookData *book_data = l->data; @@ -1142,8 +1142,10 @@ e_select_names_completion_handle_request (ECompletion *comp, const gchar *text, fprintf (out, "text=\"%s\" pos=%d limit=%d\n", text, pos, limit); } - e_select_names_model_text_pos (selcomp->priv->model, pos, &index, NULL, NULL); - str = index >= 0 ? e_select_names_model_get_string (selcomp->priv->model, index) : NULL; + e_select_names_model_text_pos (selcomp->priv->text_model->source, + selcomp->priv->text_model->seplen, + pos, &index, NULL, NULL); + str = index >= 0 ? e_select_names_model_get_string (selcomp->priv->text_model->source, index) : NULL; if (out) fprintf (out, "index=%d str=\"%s\"\n", index, str); @@ -1225,13 +1227,12 @@ e_select_names_completion_book_ready (EBook *book, EBookStatus status, ESelectNa */ ECompletion * -e_select_names_completion_new (EBook *book, ESelectNamesModel *model) +e_select_names_completion_new (EBook *book, ESelectNamesTextModel *text_model) { ESelectNamesCompletion *comp; g_return_val_if_fail (book == NULL || E_IS_BOOK (book), NULL); - g_return_val_if_fail (model, NULL); - g_return_val_if_fail (E_IS_SELECT_NAMES_MODEL (model), NULL); + g_return_val_if_fail (E_IS_SELECT_NAMES_TEXT_MODEL (text_model), NULL); comp = (ESelectNamesCompletion *) gtk_type_new (e_select_names_completion_get_type ()); @@ -1253,8 +1254,8 @@ e_select_names_completion_new (EBook *book, ESelectNamesModel *model) e_select_names_completion_add_book (comp, book); } - comp->priv->model = model; - gtk_object_ref (GTK_OBJECT (model)); + comp->priv->text_model = text_model; + gtk_object_ref (GTK_OBJECT (text_model)); return E_COMPLETION (comp); } |