diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-10-26 15:07:26 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-10-26 15:07:26 -0400 |
commit | f7813deb266c46495b67940771662a6fabea3d29 (patch) | |
tree | 8489d3d21f79db1ae483985174abceef44250670 /tests/teststack.c | |
parent | e41a8cf6fc5452df23e7df451dc752fa3030b12d (diff) | |
download | gtk+-f7813deb266c46495b67940771662a6fabea3d29.tar.gz |
Test h/vhomogenenous in teststack
Add separate checkboxes for hhomogeneous and vhomogeneous.
Diffstat (limited to 'tests/teststack.c')
-rw-r--r-- | tests/teststack.c | 21 |
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); |