[evolution-data-server] ESourceRegistry: Use g_main_context_ref_thread_default().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] ESourceRegistry: Use g_main_context_ref_thread_default().
- Date: Tue, 19 Jun 2012 12:53:07 +0000 (UTC)
commit d5325a0c46120b9737f66a20abfb265135921246
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jun 19 07:33:40 2012 -0400
ESourceRegistry: Use g_main_context_ref_thread_default().
Slightly more convenient than g_main_context_get_thread_default(), which
requires checking for NULL before referencing the main context ourselves.
libedataserver/e-source-registry.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libedataserver/e-source-registry.c b/libedataserver/e-source-registry.c
index d07a7b8..361d0e2 100644
--- a/libedataserver/e-source-registry.c
+++ b/libedataserver/e-source-registry.c
@@ -1217,9 +1217,7 @@ e_source_registry_init (ESourceRegistry *registry)
/* This is so the object manager thread can schedule signal
* emissions on the thread-default context for this thread. */
- registry->priv->main_context = g_main_context_get_thread_default ();
- if (registry->priv->main_context != NULL)
- g_main_context_ref (registry->priv->main_context);
+ registry->priv->main_context = g_main_context_ref_thread_default ();
/* D-Bus object path -> ESource */
registry->priv->object_path_table =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]