From f7813deb266c46495b67940771662a6fabea3d29 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 Oct 2014 15:07:26 -0400 Subject: Test h/vhomogenenous in teststack Add separate checkboxes for hhomogeneous and vhomogeneous. --- tests/teststack.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'tests') 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); -- cgit v1.2.1