summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/autotestfilechooser.c6
-rw-r--r--tests/autotestfilesystem.c2
-rw-r--r--tests/stresstest-toolbar.c2
-rw-r--r--tests/testassistant.c2
-rw-r--r--tests/testcombo.c2
-rw-r--r--tests/testcombochange.c2
-rw-r--r--tests/testdnd.c8
-rw-r--r--tests/testentrycompletion.c2
-rw-r--r--tests/testmenus.c2
-rw-r--r--tests/testmerge.c2
-rw-r--r--tests/testsocket_common.c2
-rwxr-xr-xtests/teststatusicon.c4
-rw-r--r--tests/testtext.c2
-rw-r--r--tests/testtoolbar.c4
-rw-r--r--tests/testtreeflow.c2
15 files changed, 22 insertions, 22 deletions
diff --git a/tests/autotestfilechooser.c b/tests/autotestfilechooser.c
index e7aa8de685..2706d9d522 100644
--- a/tests/autotestfilechooser.c
+++ b/tests/autotestfilechooser.c
@@ -122,7 +122,7 @@ test_set_filename (GtkFileChooserAction action,
(* set_filename_fn) (GTK_FILE_CHOOSER (chooser), data);
- g_timeout_add (2000, set_filename_timeout_cb, &closure);
+ gdk_threads_add_timeout (2000, set_filename_timeout_cb, &closure);
gtk_dialog_run (GTK_DIALOG (chooser));
retval = (* compare_filename_fn) (GTK_FILE_CHOOSER (chooser), data);
@@ -332,7 +332,7 @@ test_confirm_overwrite_for_path (const char *path)
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (closure.chooser), path);
- g_timeout_add (2000, confirm_overwrite_timeout_cb, &closure);
+ gdk_threads_add_timeout (2000, confirm_overwrite_timeout_cb, &closure);
gtk_dialog_run (GTK_DIALOG (closure.chooser));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (closure.chooser));
@@ -899,7 +899,7 @@ sleep_timeout_cb (gpointer data)
static void
sleep_in_main_loop (int milliseconds)
{
- g_timeout_add (milliseconds, sleep_timeout_cb, NULL);
+ gdk_threads_add_timeout (milliseconds, sleep_timeout_cb, NULL);
gtk_main ();
}
diff --git a/tests/autotestfilesystem.c b/tests/autotestfilesystem.c
index 33bd6ba4b0..9738fc63a7 100644
--- a/tests/autotestfilesystem.c
+++ b/tests/autotestfilesystem.c
@@ -105,7 +105,7 @@ timeout_cb (gpointer data)
static void
wait_for_callback (TestCallbackClosure *closure)
{
- g_timeout_add (CALLBACK_TIMEOUT_MS, timeout_cb, closure);
+ gdk_threads_add_timeout (CALLBACK_TIMEOUT_MS, timeout_cb, closure);
gtk_main ();
}
diff --git a/tests/stresstest-toolbar.c b/tests/stresstest-toolbar.c
index 74fbcbf470..17a59f2464 100644
--- a/tests/stresstest-toolbar.c
+++ b/tests/stresstest-toolbar.c
@@ -137,7 +137,7 @@ main (gint argc, gchar **argv)
gtk_widget_show (GTK_WIDGET (info.window));
- g_idle_add (stress_test_old_api, &info);
+ gdk_threads_add_idle (stress_test_old_api, &info);
gtk_widget_show_all (GTK_WIDGET (info.window));
diff --git a/tests/testassistant.c b/tests/testassistant.c
index 826bb85028..3eff2cdf5d 100644
--- a/tests/testassistant.c
+++ b/tests/testassistant.c
@@ -143,7 +143,7 @@ prepare_callback (GtkWidget *widget, GtkWidget *page)
progress = GTK_BIN (page)->child;
gtk_assistant_set_page_complete (GTK_ASSISTANT (widget), page, FALSE);
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progress), 0.0);
- g_timeout_add (300, (GSourceFunc) progress_timeout, widget);
+ gdk_threads_add_timeout (300, (GSourceFunc) progress_timeout, widget);
}
else
g_print ("prepare: %d\n", gtk_assistant_get_current_page (GTK_ASSISTANT (widget)));
diff --git a/tests/testcombo.c b/tests/testcombo.c
index 12d8de3447..c27cc005fb 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -1332,7 +1332,7 @@ main (int argc, char **argv)
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
#if 1
- g_timeout_add (1000, (GSourceFunc) capital_animation, model);
+ gdk_threads_add_timeout (1000, (GSourceFunc) capital_animation, model);
#endif
gtk_widget_show_all (window);
diff --git a/tests/testcombochange.c b/tests/testcombochange.c
index b67b0f50fe..7e42cbca14 100644
--- a/tests/testcombochange.c
+++ b/tests/testcombochange.c
@@ -228,7 +228,7 @@ on_animate (void)
{
n_animations += 20;
- timer = g_timeout_add (1000, (GSourceFunc) animation_timer, NULL);
+ timer = gdk_threads_add_timeout (1000, (GSourceFunc) animation_timer, NULL);
}
int
diff --git a/tests/testdnd.c b/tests/testdnd.c
index d2e9a5c488..608cfc8693 100644
--- a/tests/testdnd.c
+++ b/tests/testdnd.c
@@ -485,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)
@@ -534,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;
@@ -550,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;
}
diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c
index a0cf7d7752..483010b1f9 100644
--- a/tests/testentrycompletion.c
+++ b/tests/testentrycompletion.c
@@ -417,7 +417,7 @@ main (int argc, char *argv[])
gtk_entry_completion_set_text_column (completion, 0);
/* Fill the completion dynamically */
- g_timeout_add (1000, (GSourceFunc) animation_timer, completion);
+ gdk_threads_add_timeout (1000, (GSourceFunc) animation_timer, completion);
/* Fourth entry */
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Model-less entry completion"), FALSE, FALSE, 0);
diff --git a/tests/testmenus.c b/tests/testmenus.c
index 81c1964203..86eda4bc46 100644
--- a/tests/testmenus.c
+++ b/tests/testmenus.c
@@ -151,7 +151,7 @@ main (int argc, char **argv)
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_widget_show (menuitem);
- g_timeout_add (250, change_item, submenu);
+ gdk_threads_add_timeout (250, change_item, submenu);
menuitem = gtk_menu_item_new_with_label ("bar");
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (4, TRUE));
diff --git a/tests/testmerge.c b/tests/testmerge.c
index 6832f759d6..8aa5002d5e 100644
--- a/tests/testmerge.c
+++ b/tests/testmerge.c
@@ -140,7 +140,7 @@ static void
toggle_dynamic (GtkWidget *button,
GtkUIManager *merge)
{
- g_timeout_add (2000, (GSourceFunc)delayed_toggle_dynamic, merge);
+ gdk_threads_add_timeout (2000, (GSourceFunc)delayed_toggle_dynamic, merge);
}
static void
diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c
index a4760893da..0879865c8d 100644
--- a/tests/testsocket_common.c
+++ b/tests/testsocket_common.c
@@ -97,7 +97,7 @@ blink (GtkWidget *widget,
if (!blink_timeout)
{
- blink_timeout = g_timeout_add (1000, blink_cb, window);
+ blink_timeout = gdk_threads_add_timeout (1000, blink_cb, window);
gtk_widget_hide (window);
g_object_set_data (G_OBJECT (window), "blink", GUINT_TO_POINTER (blink_timeout));
diff --git a/tests/teststatusicon.c b/tests/teststatusicon.c
index 9a27492519..1256152e97 100755
--- a/tests/teststatusicon.c
+++ b/tests/teststatusicon.c
@@ -126,7 +126,7 @@ timeout_toggle_toggled (GtkToggleButton *toggle)
}
else
{
- timeout = g_timeout_add (2000, timeout_handler, NULL);
+ timeout = gdk_threads_add_timeout (2000, timeout_handler, NULL);
}
}
@@ -301,7 +301,7 @@ main (int argc, char **argv)
icons = g_slist_append (icons, icon);
- timeout = g_timeout_add (2000, timeout_handler, icon);
+ timeout = gdk_threads_add_timeout (2000, timeout_handler, icon);
}
gtk_main ();
diff --git a/tests/testtext.c b/tests/testtext.c
index 5ad9304bca..b1f6f532a0 100644
--- a/tests/testtext.c
+++ b/tests/testtext.c
@@ -2460,7 +2460,7 @@ buffer_set_colors (Buffer *buffer,
gdouble hue = 0.0;
if (enabled && buffer->color_cycle_timeout == 0)
- buffer->color_cycle_timeout = g_timeout_add (200, color_cycle_timeout, buffer);
+ buffer->color_cycle_timeout = gdk_threads_add_timeout (200, color_cycle_timeout, buffer);
else if (!enabled && buffer->color_cycle_timeout != 0)
{
g_source_remove (buffer->color_cycle_timeout);
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c
index 0818c5dcea..1e4985f8f6 100644
--- a/tests/testtoolbar.c
+++ b/tests/testtoolbar.c
@@ -608,7 +608,7 @@ main (gint argc, gchar **argv)
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL);
add_item_to_list (store, item, "New");
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
- g_timeout_add (3000, (GSourceFunc) timeout_cb, item);
+ gdk_threads_add_timeout (3000, (GSourceFunc) timeout_cb, item);
gtk_tool_item_set_expand (item, TRUE);
menu = gtk_menu_new ();
@@ -626,7 +626,7 @@ main (gint argc, gchar **argv)
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu);
add_item_to_list (store, item, "Open");
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
- g_timeout_add (3000, (GSourceFunc) timeout_cb1, item);
+ gdk_threads_add_timeout (3000, (GSourceFunc) timeout_cb1, item);
menu = gtk_menu_new ();
for (i = 0; i < 20; i++)
diff --git a/tests/testtreeflow.c b/tests/testtreeflow.c
index 1af0b6e72c..e5ebacd899 100644
--- a/tests/testtreeflow.c
+++ b/tests/testtreeflow.c
@@ -168,7 +168,7 @@ main (int argc, char *argv[])
g_signal_connect (button, "realize", G_CALLBACK (gtk_widget_grab_focus), NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
gtk_widget_show_all (window);
- g_timeout_add (1000, (GSourceFunc) futz, NULL);
+ gdk_threads_add_timeout (1000, (GSourceFunc) futz, NULL);
gtk_main ();
return 0;
}