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.
This commit is contained in:
committed by
Matthias Clasen
parent
7854bd1b6e
commit
721c3bc101
@ -5264,7 +5264,7 @@ gtk_clist_motion (GtkWidget *widget,
|
||||
if (clist->htimer)
|
||||
return FALSE;
|
||||
|
||||
clist->htimer = g_timeout_add
|
||||
clist->htimer = gdk_threads_add_timeout
|
||||
(SCROLL_TIME, (GSourceFunc) horizontal_timeout, clist);
|
||||
|
||||
if (!((x < 0 && clist->hadjustment->value == 0) ||
|
||||
@ -5296,7 +5296,7 @@ gtk_clist_motion (GtkWidget *widget,
|
||||
if (clist->vtimer)
|
||||
return FALSE;
|
||||
|
||||
clist->vtimer = g_timeout_add (SCROLL_TIME,
|
||||
clist->vtimer = gdk_threads_add_timeout (SCROLL_TIME,
|
||||
(GSourceFunc) vertical_timeout, clist);
|
||||
|
||||
if (clist->drag_button &&
|
||||
@ -7039,26 +7039,18 @@ do_fake_motion (GtkWidget *widget)
|
||||
static gint
|
||||
horizontal_timeout (GtkCList *clist)
|
||||
{
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
clist->htimer = 0;
|
||||
do_fake_motion (GTK_WIDGET (clist));
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
vertical_timeout (GtkCList *clist)
|
||||
{
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
clist->vtimer = 0;
|
||||
do_fake_motion (GTK_WIDGET (clist));
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user