diff options
author | Milan Crha <mcrha@redhat.com> | 2011-06-24 00:30:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-06-24 00:30:36 +0800 |
commit | 4778e69589b8d5fca5b59cdb664b8e6e39a4697f (patch) | |
tree | 638161bcfa62d0a39a3f33b4979acb7a38159b5f /addressbook/gui | |
parent | 4aff7a476d813922b5ded6a72a10b38f3ddfe006 (diff) | |
download | gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.gz gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.zst gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.zip |
Postpone ENameSelector loading as much as possible
Also fixes few memory leaks around ENameSelector and cancels
loading of its address books when not needed any more.
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 10 |
1 files changed, 2 insertions, 8 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 a4f30ca573..a6a9ceca15 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -1133,7 +1133,6 @@ setup_custom_widgets (EContactListEditor *editor) GtkWidget *combo_box; ESourceList *source_list; ENameSelectorEntry *name_selector_entry; - ENameSelector *name_selector; GtkWidget *old, *parent; EContactListEditorPrivate *priv; GError *error = NULL; @@ -1162,14 +1161,8 @@ setup_custom_widgets (EContactListEditor *editor) old = CONTACT_LIST_EDITOR_WIDGET (editor, "email-entry"); g_return_if_fail (old != NULL); - name_selector = e_name_selector_new (); - - e_name_selector_model_add_section ( - e_name_selector_peek_model (name_selector), - "Members", _("_Members"), NULL); - name_selector_entry = e_name_selector_peek_section_entry ( - name_selector, "Members"); + priv->name_selector, "Members"); gtk_widget_set_name ( GTK_WIDGET (name_selector_entry), @@ -1316,6 +1309,7 @@ contact_list_editor_dispose (GObject *object) EContactListEditorPrivate *priv = editor->priv; if (priv->name_selector) { + e_name_selector_cancel_loading (priv->name_selector); g_object_unref (priv->name_selector); priv->name_selector = NULL; } |