]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkpathbar.c
Replace a lot of idle and timeout calls by the new gdk_threads api.
[~andy/gtk] / gtk / gtkpathbar.c
index c695ba5b045bb625c1cbbef852a62e185bc52cb7..8be9848f9da8e20bb4bb31d7b43733ed568b3e02 100644 (file)
@@ -755,8 +755,6 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
 {
   gboolean retval = FALSE;
 
-  GDK_THREADS_ENTER ();
-
   if (path_bar->timer)
     {
       if (path_bar->scrolling_up)
@@ -773,7 +771,7 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
 
          path_bar->need_timer = FALSE;
 
-         path_bar->timer = g_timeout_add (timeout * SCROLL_DELAY_FACTOR,
+         path_bar->timer = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
                                           (GSourceFunc)gtk_path_bar_scroll_timeout,
                                           path_bar);
        }
@@ -781,8 +779,6 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
        retval = TRUE;
     }
 
-  GDK_THREADS_LEAVE ();
-
   return retval;
 }
 
@@ -828,7 +824,7 @@ gtk_path_bar_slider_button_press (GtkWidget      *widget,
       g_object_get (settings, "gtk-timeout-initial", &timeout, NULL);
 
       path_bar->need_timer = TRUE;
-      path_bar->timer = g_timeout_add (timeout,
+      path_bar->timer = gdk_threads_add_timeout (timeout,
                                       (GSourceFunc)gtk_path_bar_scroll_timeout,
                                       path_bar);
     }