diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-12-22 19:10:43 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-12-22 19:10:43 +0000 |
commit | 721c3bc10182cacf1a98baddde3c94e59797ddb7 (patch) | |
tree | 78b2e3ae3c00133a58f09653aff664e4ab0305e9 /gtk/gtkmenu.c | |
parent | 7854bd1b6e6102aff426bf6a48606c4a9b12b7c2 (diff) | |
download | gtk+-721c3bc10182cacf1a98baddde3c94e59797ddb7.tar.gz |
Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22 Matthias Clasen <mclasen@redhat.com>
* *.c: Replace a lot of idle and timeout calls by
the new gdk_threads api.
Diffstat (limited to 'gtk/gtkmenu.c')
-rw-r--r-- | gtk/gtkmenu.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 7460061231..70f9f9b4ed 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -3022,8 +3022,6 @@ gtk_menu_scroll_timeout (gpointer data) GtkSettings *settings; gboolean touchscreen_mode; - GDK_THREADS_ENTER (); - menu = GTK_MENU (data); settings = gtk_widget_get_settings (GTK_WIDGET (menu)); @@ -3033,8 +3031,6 @@ gtk_menu_scroll_timeout (gpointer data) gtk_menu_do_timeout_scroll (menu, touchscreen_mode); - GDK_THREADS_LEAVE (); - return TRUE; } @@ -3046,8 +3042,6 @@ gtk_menu_scroll_timeout_initial (gpointer data) guint timeout; gboolean touchscreen_mode; - GDK_THREADS_ENTER (); - menu = GTK_MENU (data); settings = gtk_widget_get_settings (GTK_WIDGET (menu)); @@ -3060,9 +3054,7 @@ gtk_menu_scroll_timeout_initial (gpointer data) gtk_menu_remove_scroll_timeout (menu); - menu->timeout_id = g_timeout_add (timeout, gtk_menu_scroll_timeout, menu); - - GDK_THREADS_LEAVE (); + menu->timeout_id = gdk_threads_add_timeout (timeout, gtk_menu_scroll_timeout, menu); return FALSE; } @@ -3082,7 +3074,7 @@ gtk_menu_start_scrolling (GtkMenu *menu) gtk_menu_do_timeout_scroll (menu, touchscreen_mode); - menu->timeout_id = g_timeout_add (timeout, gtk_menu_scroll_timeout_initial, + menu->timeout_id = gdk_threads_add_timeout (timeout, gtk_menu_scroll_timeout_initial, menu); } @@ -3228,7 +3220,7 @@ gtk_menu_handle_scrolling (GtkMenu *menu, -MENU_SCROLL_STEP2 : -MENU_SCROLL_STEP1; menu->timeout_id = - g_timeout_add (scroll_fast ? + gdk_threads_add_timeout (scroll_fast ? MENU_SCROLL_TIMEOUT2 : MENU_SCROLL_TIMEOUT1, gtk_menu_scroll_timeout, menu); } @@ -3322,7 +3314,7 @@ gtk_menu_handle_scrolling (GtkMenu *menu, MENU_SCROLL_STEP2 : MENU_SCROLL_STEP1; menu->timeout_id = - g_timeout_add (scroll_fast ? + gdk_threads_add_timeout (scroll_fast ? MENU_SCROLL_TIMEOUT2 : MENU_SCROLL_TIMEOUT1, gtk_menu_scroll_timeout, menu); } @@ -3485,8 +3477,6 @@ gtk_menu_stop_navigating_submenu_cb (gpointer user_data) GtkMenu *menu = user_data; GdkWindow *child_window; - GDK_THREADS_ENTER (); - gtk_menu_stop_navigating_submenu (menu); if (GTK_WIDGET_REALIZED (menu)) @@ -3507,8 +3497,6 @@ gtk_menu_stop_navigating_submenu_cb (gpointer user_data) } } - GDK_THREADS_LEAVE (); - return FALSE; } @@ -3682,7 +3670,7 @@ gtk_menu_set_submenu_navigation_region (GtkMenu *menu, "gtk-menu-popdown-delay", &popdown_delay, NULL); - menu->navigation_timeout = g_timeout_add (popdown_delay, + menu->navigation_timeout = gdk_threads_add_timeout (popdown_delay, gtk_menu_stop_navigating_submenu_cb, menu); #ifdef DRAW_STAY_UP_TRIANGLE |