[Xfce4-commits] <xfce4-panel:nick/gtk3> gdk_threads_enter()/_leave() deprecation.

Peter de Ridder noreply at xfce.org
Tue Apr 9 21:36:01 CEST 2013


Updating branch refs/heads/nick/gtk3
         to 61166c26b393f94872fc6ad86fd13ff8fccb99d3 (commit)
       from e9c0da4a9fdf6b9fb9dd7cd9eb79432f7a935604 (commit)

commit 61166c26b393f94872fc6ad86fd13ff8fccb99d3
Author: Peter de Ridder <peter at xfce.org>
Date:   Tue Apr 9 20:34:42 2013 +0200

    gdk_threads_enter()/_leave() deprecation.

 panel/panel-application.c |    6 ++----
 panel/panel-base-window.c |    4 +---
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/panel/panel-application.c b/panel/panel-application.c
index bd19f1c..a883a80 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -505,9 +505,7 @@ panel_application_wait_for_window_manager_destroyed (gpointer data)
 
   /* start loading the panels, hopefully a window manager is found, but it
    * probably also works fine without... */
-  GDK_THREADS_ENTER ();
   panel_application_load_real (application);
-  GDK_THREADS_LEAVE ();
 }
 #endif
 
@@ -1216,8 +1214,8 @@ panel_application_load (PanelApplication  *application,
 
       /* setup timeout to check for a window manager */
       application->wait_for_wm_timeout_id =
-          g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 50, panel_application_wait_for_window_manager,
-                              wfwm, panel_application_wait_for_window_manager_destroyed);
+          gdk_threads_add_timeout_full (G_PRIORITY_DEFAULT_IDLE, 50, panel_application_wait_for_window_manager,
+                                        wfwm, panel_application_wait_for_window_manager_destroyed);
     }
   else
     {
diff --git a/panel/panel-base-window.c b/panel/panel-base-window.c
index 24a0801..e4039eb 100644
--- a/panel/panel-base-window.c
+++ b/panel/panel-base-window.c
@@ -403,7 +403,7 @@ panel_base_window_set_property (GObject      *object,
           if (priv->active_timeout_id == 0)
             {
               /* start timeout for the marching ants selection */
-              priv->active_timeout_id = g_timeout_add_seconds_full (
+              priv->active_timeout_id = gdk_threads_add_timeout_seconds_full (
                   G_PRIORITY_DEFAULT_IDLE, 1,
                   panel_base_window_active_timeout, object,
                   panel_base_window_active_timeout_destroyed);
@@ -731,9 +731,7 @@ static gboolean
 panel_base_window_active_timeout (gpointer user_data)
 {
   /* redraw to update marching ants */
-  GDK_THREADS_ENTER ();
   gtk_widget_queue_draw (GTK_WIDGET (user_data));
-  GDK_THREADS_LEAVE ();
 
   return TRUE;
 }


More information about the Xfce4-commits mailing list