[gtk+] Test h/vhomogenenous in teststack
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Test h/vhomogenenous in teststack
- Date: Sun, 26 Oct 2014 19:12:36 +0000 (UTC)
commit f7813deb266c46495b67940771662a6fabea3d29
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 26 15:07:26 2014 -0400
Test h/vhomogenenous in teststack
Add separate checkboxes for hhomogeneous and vhomogeneous.
tests/teststack.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/tests/teststack.c b/tests/teststack.c
index 2c9e5fa..c74c7a2 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]