]> Pileus Git - ~andy/gtk/blobdiff - tests/testdnd.c
Replace a lot of idle and timeout calls by the new gdk_threads api.
[~andy/gtk] / tests / testdnd.c
index 88ff0345ed9679d99139dff6ca8409a211ba0207..608cfc869321f812f5023c6873ca47cab51552aa 100644 (file)
@@ -1,3 +1,24 @@
+/* testdnd.c
+ * Copyright (C) 1998  Red Hat, Inc.
+ * Author: Owen Taylor
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
 #include "gtk/gtk.h"
 
 /* Target side drag signals */
@@ -464,12 +485,12 @@ popup_leave          (GtkWidget          *widget,
       if (!popdown_timer)
        {
          g_print ("added popdown\n");
-         popdown_timer = g_timeout_add (500, popdown_cb, NULL);
+         popdown_timer = gdk_threads_add_timeout (500, popdown_cb, NULL);
        }
     }
 }
 
-gint
+gboolean
 popup_cb (gpointer data)
 {
   if (!popped_up)
@@ -513,7 +534,7 @@ popup_cb (gpointer data)
       popped_up = TRUE;
     }
 
-  popdown_timer = g_timeout_add (500, popdown_cb, NULL);
+  popdown_timer = gdk_threads_add_timeout (500, popdown_cb, NULL);
   g_print ("added popdown\n");
 
   popup_timer = FALSE;
@@ -529,7 +550,7 @@ popsite_motion         (GtkWidget          *widget,
                    guint               time)
 {
   if (!popup_timer)
-    popup_timer = g_timeout_add (500, popup_cb, NULL);
+    popup_timer = gdk_threads_add_timeout (500, popup_cb, NULL);
 
   return TRUE;
 }
@@ -555,7 +576,7 @@ source_drag_data_delete  (GtkWidget          *widget,
 }
   
 void
-test_init ()
+test_init (void)
 {
   if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la",
                   G_FILE_TEST_EXISTS))