[Xfce4-commits] <exo:master> g_main_context_ref_thread_default() is 2.32 API (bug #9577).

Nick Schermer noreply at xfce.org
Mon Dec 3 19:26:01 CET 2012


Updating branch refs/heads/master
         to 4a2e9cf0a19916519d21deb980bbbf825f326fcc (commit)
       from 4f969631188a324d9f2e519690a537f3c9261971 (commit)

commit 4a2e9cf0a19916519d21deb980bbbf825f326fcc
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Dec 3 19:25:25 2012 +0100

    g_main_context_ref_thread_default() is 2.32 API (bug #9577).

 exo/exo-job.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/exo/exo-job.c b/exo/exo-job.c
index ec9c4a2..eae11dc 100644
--- a/exo/exo-job.c
+++ b/exo/exo-job.c
@@ -465,7 +465,14 @@ exo_job_launch (ExoJob *job)
   /* mark the job as running */
   job->priv->running = TRUE;
 
+#if GLIB_CHECK_VERSION (2, 32, 0)
   job->priv->context = g_main_context_ref_thread_default ();
+#else
+  job->priv->context = g_main_context_get_thread_default ();
+  if (job->priv->context == NULL)
+    job->priv->context = g_main_context_default ();
+  g_main_context_ref (job->priv->context);
+#endif
 
   g_io_scheduler_push_job (exo_job_scheduler_job_func, g_object_ref (job),
                            (GDestroyNotify) g_object_unref,


More information about the Xfce4-commits mailing list