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 /demos/gtk-demo | |
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 'demos/gtk-demo')
-rw-r--r-- | demos/gtk-demo/images.c | 2 | ||||
-rw-r--r-- | demos/gtk-demo/pixbufs.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c index 7fc1fa7c14..ce22eb56aa 100644 --- a/demos/gtk-demo/images.c +++ b/demos/gtk-demo/images.c @@ -255,7 +255,7 @@ start_progressive_loading (GtkWidget *image) * The timeout simply simulates a slow data source by inserting * pauses in the reading process. */ - load_timeout = g_timeout_add (150, + load_timeout = gdk_threads_add_timeout (150, progressive_timeout, image); } diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c index 18dd1ff816..5fad5aa7f7 100644 --- a/demos/gtk-demo/pixbufs.c +++ b/demos/gtk-demo/pixbufs.c @@ -187,7 +187,9 @@ timeout (gpointer data) : MAX (127, fabs (255 * cos (f * 2.0 * G_PI))))); } + GDK_THREADS_ENTER (); gtk_widget_queue_draw (da); + GDK_THREADS_LEAVE (); frame_num++; return TRUE; |