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 /composer | |
parent | 4aff7a476d813922b5ded6a72a10b38f3ddfe006 (diff) | |
download | gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.gz gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.bz2 gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.lz gsoc2013-evolution-4778e69589b8d5fca5b59cdb664b8e6e39a4697f.tar.xz 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 'composer')
-rw-r--r-- | composer/e-composer-header-table.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c index 78404a62e7..c87abcf307 100644 --- a/composer/e-composer-header-table.c +++ b/composer/e-composer-header-table.c @@ -825,6 +825,7 @@ composer_header_table_dispose (GObject *object) } if (priv->name_selector != NULL) { + e_name_selector_cancel_loading (priv->name_selector); g_object_unref (priv->name_selector); priv->name_selector = NULL; } @@ -991,6 +992,17 @@ e_composer_header_table_class_init (EComposerHeaderTableClass *class) } static void +composer_header_table_realize_cb (EComposerHeaderTable *table) +{ + g_return_if_fail (table != NULL); + g_return_if_fail (table->priv != NULL); + + g_signal_handlers_disconnect_by_func (table, composer_header_table_realize_cb, NULL); + + e_name_selector_load_books (table->priv->name_selector); +} + +static void e_composer_header_table_init (EComposerHeaderTable *table) { EComposerHeader *header; @@ -1064,6 +1076,9 @@ e_composer_header_table_init (EComposerHeaderTable *table) header->input_widget, "visible", G_BINDING_SYNC_CREATE); } + + /* postpone name_selector loading, do that only when really needed */ + g_signal_connect (table, "realize", G_CALLBACK (composer_header_table_realize_cb), NULL); } GtkWidget * |