summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1998-12-15 07:32:11 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-12-15 07:32:11 +0000
commita0c84d6818f278d273b43c651c345f2110bc7f37 (patch)
treecb07d50ab001a4538983c1d0421bcd69d9618cbf /gtk/gtkrange.c
parent58475f05a54f7a165fe92adf8358f59cf0223c08 (diff)
downloadgtk+-a0c84d6818f278d273b43c651c345f2110bc7f37.tar.gz
Commented out testthreads from the build process, since we won't have any
Tue Dec 15 01:38:53 1998 Owen Taylor <otaylor@redhat.com> * gtk/Makefile.am: Commented out testthreads from the build process, since we won't have any idea how to create a thread. * configure.in (LIBS): use glib-config ... gthread so we always build a thread-compatible library. * gtk/gtkaccellabel.c gtk/gtkclist.c gtk/gtkcolorsel.c gtk/gtkcombo.c gtk/gtkcontainer.c gtk/gtkentry.c gtk/gtklist.c gtk/gtkmenuitem.c gtk/gtknotebook.c gtk/gtkrange.c gtk/gtkselection.c gtk/gtkspinbutton.c gtk/gtktext.c gtk/gtktooltips.c gtk/gtkwidget.c: Add GTK_THREADS_ENTER/LEAVE pairs around timeouts and idles to account for the fact that they are no longer called within the GTK+ lock. * gtk/gtkprivate.h: Added definitions for locking the main GTK+ mutex. * gtk/gtkmain.c: Re-implement the main loop in terms of the GLib main loop. * gdk/gdk.h gdk/gdkthreads.c gdk/Makefile.am: Removed threading functionality, as it seems better to subsume GDK within the GTK+ lock than vice-versa. * gdk/gdkevents.c: New file, containing event handling bits from gdk.c. * gdk/gdkevents.c: Implement event source for GDK events. * configure.in gdk/gdkevents.c: Removed attempts to subtract base_id, which were already non-functional.
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r--gtk/gtkrange.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 73bed02dde..485c58f7e1 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -19,6 +19,7 @@
#include <stdio.h>
#include "gtkmain.h"
#include "gtkrange.h"
+#include "gtkprivate.h"
#include "gtksignal.h"
@@ -1236,8 +1237,7 @@ gtk_real_range_timer (GtkRange *range)
{
gint return_val;
- g_return_val_if_fail (range != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_RANGE (range), FALSE);
+ GTK_THREADS_ENTER;
return_val = TRUE;
if (range->click_child == RANGE_CLASS (range)->slider)
@@ -1258,7 +1258,10 @@ gtk_real_range_timer (GtkRange *range)
(GtkFunction) RANGE_CLASS (range)->timer,
(gpointer) range);
else
- return FALSE;
+ {
+ GTK_THREADS_LEAVE;
+ return FALSE;
+ }
range->need_timer = FALSE;
}
@@ -1284,6 +1287,8 @@ gtk_real_range_timer (GtkRange *range)
return_val = gtk_range_scroll (range, -1);
}
+ GTK_THREADS_LEAVE;
+
return return_val;
}