aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c4
-rw-r--r--calendar/gui/dialogs/memo-page.c4
-rw-r--r--calendar/gui/e-meeting-list-view.c4
-rw-r--r--composer/e-composer-name-header.c7
4 files changed, 14 insertions, 5 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 831b51eb27..dc2edd281b 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -210,6 +210,7 @@ contact_list_editor_book_loaded (EBook *new_book,
EContactListEditor *editor)
{
EContactListEditorPrivate *priv = editor->priv;
+ EContactStore *contact_store;
ENameSelectorEntry *entry;
priv->load_source_id = 0;
@@ -227,7 +228,8 @@ contact_list_editor_book_loaded (EBook *new_book,
}
entry = E_NAME_SELECTOR_ENTRY (WIDGET (EMAIL_ENTRY));
- e_contact_store_add_book (entry->contact_store, new_book);
+ contact_store = e_name_selector_entry_peek_contact_store (entry);
+ e_contact_store_add_book (contact_store, new_book);
e_contact_list_editor_set_book (editor, new_book);
g_object_unref (new_book);
}
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index b8567a615a..b02207461b 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -435,12 +435,14 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
if (contact && e_contact_get (contact , E_CONTACT_IS_LIST)) {
EBook *book = NULL;
ENameSelectorDialog *dialog;
+ ENameSelectorModel *model;
EContactStore *c_store;
GList *books, *l;
gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI);
dialog = e_name_selector_peek_dialog (name_selector);
- c_store = e_name_selector_dialog_peek_model (dialog)->contact_store;
+ model = e_name_selector_dialog_peek_model (dialog);
+ c_store = e_name_selector_model_peek_contact_store (model);
books = e_contact_store_get_books (c_store);
for (l = books; l; l = l->next) {
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 0e48f7cb32..9920de85e1 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -771,12 +771,14 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
if (contact && e_contact_get (contact , E_CONTACT_IS_LIST)) {
EBook *book = NULL;
ENameSelectorDialog *dialog;
+ ENameSelectorModel *model;
EContactStore *c_store;
GList *books, *l;
gchar *uri = e_contact_get (contact, E_CONTACT_BOOK_URI);
dialog = e_name_selector_peek_dialog (view->priv->name_selector);
- c_store = e_name_selector_dialog_peek_model (dialog)->contact_store;
+ model = e_name_selector_dialog_peek_model (dialog);
+ c_store = e_name_selector_model_peek_contact_store (model);
books = e_contact_store_get_books (c_store);
for (l = books; l; l = l->next) {
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index 658e7cc292..eadef10910 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -112,6 +112,7 @@ composer_name_header_constructor (GType type,
ENameSelectorModel *model;
ENameSelectorEntry *entry;
GObject *object;
+ GList *sections;
gchar *label;
/* Chain up to parent's constructor() method. */
@@ -125,9 +126,11 @@ composer_name_header_constructor (GType type,
label = e_composer_header_get_label (E_COMPOSER_HEADER (object));
g_assert (label != NULL);
- /* XXX Peeking at private data. */
- priv->destination_index = model->sections->len;
+ sections = e_name_selector_model_list_sections (model);
+ priv->destination_index = g_list_length (sections);
e_name_selector_model_add_section (model, label, label, NULL);
+ g_list_foreach (sections, (GFunc) g_free, NULL);
+ g_list_free (sections);
e_composer_header_set_title_tooltip (
E_COMPOSER_HEADER (object),