summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-01-30 19:12:27 -0500
committerMatthias Clasen <mclasen@redhat.com>2012-01-30 19:12:27 -0500
commit585a6652d5ca2123a15290ee3138fb8c36ad14cc (patch)
treeda404859ae663f70bc2822383d386ff918c52409 /tests
parent7a080413add02b80c4217a9fbe81467017aae2a5 (diff)
downloadgtk+-585a6652d5ca2123a15290ee3138fb8c36ad14cc.tar.gz
Use G_SOURCE_CONTINUE/REMOVE
Now that GLib provides these macros, we should use them to make the code more readable.
Diffstat (limited to 'tests')
-rw-r--r--tests/a11y/testfocus.c2
-rw-r--r--tests/reftests/gtk-reftest.c2
-rw-r--r--tests/testgtk.c4
-rw-r--r--tests/testimage.c2
-rw-r--r--tests/testoffscreen.c5
-rw-r--r--tests/testtreechanging.c2
-rw-r--r--tests/testvolumebutton.c2
7 files changed, 9 insertions, 10 deletions
diff --git a/tests/a11y/testfocus.c b/tests/a11y/testfocus.c
index 131a82ae60..c438f6d5c2 100644
--- a/tests/a11y/testfocus.c
+++ b/tests/a11y/testfocus.c
@@ -50,7 +50,7 @@ compare_focus (gpointer data)
g_print ("gtk focus: %s != atk focus: %s\n",
get_name (gtk_focus), get_name (atk_focus));
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
diff --git a/tests/reftests/gtk-reftest.c b/tests/reftests/gtk-reftest.c
index 5b002f1a50..ae41d32010 100644
--- a/tests/reftests/gtk-reftest.c
+++ b/tests/reftests/gtk-reftest.c
@@ -198,7 +198,7 @@ quit_when_idle (gpointer loop)
{
g_main_loop_quit (loop);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
static void
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 203ecb4555..655868b561 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -3656,7 +3656,7 @@ entry_progress_timeout (gpointer data)
gtk_entry_set_progress_fraction (GTK_ENTRY (data), fraction);
}
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
@@ -9047,7 +9047,7 @@ idle_test (GtkWidget *label)
sprintf (buffer, "count: %d", ++count);
gtk_label_set_text (GTK_LABEL (label), buffer);
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
diff --git a/tests/testimage.c b/tests/testimage.c
index 2f0da45bb9..73072edebc 100644
--- a/tests/testimage.c
+++ b/tests/testimage.c
@@ -74,7 +74,7 @@ idle_func (gpointer data)
{
g_print ("keep me busy\n");
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static gboolean
diff --git a/tests/testoffscreen.c b/tests/testoffscreen.c
index ff9ba6b9e0..62589b5dd8 100644
--- a/tests/testoffscreen.c
+++ b/tests/testoffscreen.c
@@ -63,9 +63,8 @@ scroll_layout (gpointer data)
GtkAdjustment *adj;
adj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (layout));
- gtk_adjustment_set_value (adj,
- gtk_adjustment_get_value (adj) + 5.0);
- return TRUE;
+ gtk_adjustment_set_value (adj, gtk_adjustment_get_value (adj) + 5.0);
+ return G_SOURCE_CONTINUE;
}
static guint layout_timeout;
diff --git a/tests/testtreechanging.c b/tests/testtreechanging.c
index 106fc3704a..478e5fcb68 100644
--- a/tests/testtreechanging.c
+++ b/tests/testtreechanging.c
@@ -407,7 +407,7 @@ dance (gpointer treeview)
check_sanity (treeview);
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c
index 29b3e33f94..85e7469bc5 100644
--- a/tests/testvolumebutton.c
+++ b/tests/testvolumebutton.c
@@ -70,7 +70,7 @@ show_error (gpointer data)
G_CALLBACK (response_cb), NULL);
gtk_widget_show (dialog);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
int