diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-12-08 13:16:09 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-03 11:00:39 +0800 |
commit | 571e5e17f8b3dae8ecd81cd1f437ebb128159575 (patch) | |
tree | 5c96bd734f741f6af41eb97ac2657dae93f4cb20 /addressbook/gui/widgets/e-book-source-config.c | |
parent | b99b09e4570d7b24c23fc8b97606eaa9057bbd5c (diff) | |
download | gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar.gz gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar.bz2 gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar.lz gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar.xz gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.tar.zst gsoc2013-evolution-571e5e17f8b3dae8ecd81cd1f437ebb128159575.zip |
Adapt addressbook/gui/widgets to the new ESource API.
Diffstat (limited to 'addressbook/gui/widgets/e-book-source-config.c')
-rw-r--r-- | addressbook/gui/widgets/e-book-source-config.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/addressbook/gui/widgets/e-book-source-config.c b/addressbook/gui/widgets/e-book-source-config.c index 8b9ed62b30..7c751030b5 100644 --- a/addressbook/gui/widgets/e-book-source-config.c +++ b/addressbook/gui/widgets/e-book-source-config.c @@ -40,13 +40,13 @@ G_DEFINE_TYPE ( E_TYPE_SOURCE_CONFIG) static ESource * -book_source_config_get_default (ESourceConfig *config) +book_source_config_ref_default (ESourceConfig *config) { ESourceRegistry *registry; registry = e_source_config_get_registry (config); - return e_source_registry_get_default_address_book (registry); + return e_source_registry_ref_default_address_book (registry); } static void @@ -109,7 +109,7 @@ book_source_config_constructed (GObject *object) priv->autocomplete_button = g_object_ref_sink (widget); gtk_widget_show (widget); - default_source = book_source_config_get_default (config); + default_source = book_source_config_ref_default (config); original_source = e_source_config_get_original_source (config); if (original_source != NULL) { @@ -119,6 +119,8 @@ book_source_config_constructed (GObject *object) g_object_set (priv->default_button, "active", active, NULL); } + g_object_unref (default_source); + e_source_config_insert_widget ( config, NULL, NULL, priv->default_button); @@ -173,7 +175,7 @@ book_source_config_commit_changes (ESourceConfig *config, class = E_SOURCE_CONFIG_CLASS (e_book_source_config_parent_class); class->commit_changes (config, scratch_source); - default_source = book_source_config_get_default (config); + default_source = book_source_config_ref_default (config); /* The default setting is a little tricky to get right. If * the toggle button is active, this ESource is now the default. @@ -185,6 +187,8 @@ book_source_config_commit_changes (ESourceConfig *config, book_source_config_set_default (config, scratch_source); else if (e_source_equal (scratch_source, default_source)) book_source_config_set_default (config, NULL); + + g_object_unref (default_source); } static void |