summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-10-26 15:07:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-10-26 15:07:26 -0400
commitf7813deb266c46495b67940771662a6fabea3d29 (patch)
tree8489d3d21f79db1ae483985174abceef44250670 /tests
parente41a8cf6fc5452df23e7df451dc752fa3030b12d (diff)
downloadgtk+-f7813deb266c46495b67940771662a6fabea3d29.tar.gz
Test h/vhomogenenous in teststack
Add separate checkboxes for hhomogeneous and vhomogeneous.
Diffstat (limited to 'tests')
-rw-r--r--tests/teststack.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/teststack.c b/tests/teststack.c
index 2c9e5fa030..c74c7a2468 100644
--- a/tests/teststack.c
+++ b/tests/teststack.c
@@ -18,10 +18,17 @@ set_visible_child_name (GtkWidget *button, gpointer data)
}
static void
-toggle_homogeneous (GtkWidget *button, gpointer data)
+toggle_hhomogeneous (GtkWidget *button, gpointer data)
{
gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
- gtk_stack_set_homogeneous (GTK_STACK (stack), active);
+ gtk_stack_set_hhomogeneous (GTK_STACK (stack), active);
+}
+
+static void
+toggle_vhomogeneous (GtkWidget *button, gpointer data)
+{
+ gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_stack_set_vhomogeneous (GTK_STACK (stack), active);
}
static void
@@ -209,11 +216,17 @@ main (gint argc,
gtk_container_add (GTK_CONTAINER (hbox), button);
g_signal_connect (button, "clicked", (GCallback) set_visible_child_name, (gpointer) "3");
+ button = gtk_check_button_new ();
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
+ gtk_stack_get_hhomogeneous (GTK_STACK (stack)));
+ gtk_container_add (GTK_CONTAINER (hbox), button);
+ g_signal_connect (button, "clicked", (GCallback) toggle_hhomogeneous, NULL);
+
button = gtk_check_button_new_with_label ("homogeneous");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
- gtk_stack_get_homogeneous (GTK_STACK (stack)));
+ gtk_stack_get_vhomogeneous (GTK_STACK (stack)));
gtk_container_add (GTK_CONTAINER (hbox), button);
- g_signal_connect (button, "clicked", (GCallback) toggle_homogeneous, NULL);
+ g_signal_connect (button, "clicked", (GCallback) toggle_vhomogeneous, NULL);
button = gtk_toggle_button_new_with_label ("Add icon");
g_signal_connect (button, "toggled", (GCallback) toggle_icon_name, NULL);