From 0ca07a6df736eb9c549f144c3850ee8899638a80 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 29 Nov 2010 10:14:21 -0500 Subject: [PATCH] Add a GtkSwitch --- tests/testmerge.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/testmerge.c b/tests/testmerge.c index 1e43bb818b..3f1eba0eb2 100644 --- a/tests/testmerge.c +++ b/tests/testmerge.c @@ -592,6 +592,7 @@ main (int argc, char **argv) GtkUIManager *merge; GtkWidget *window, *table, *frame, *menu_box, *vbox, *view; GtkWidget *button, *area, *statusbar; + GtkWidget *box; gint i; gtk_init (&argc, &argv); @@ -652,6 +653,15 @@ main (int argc, char **argv) gtk_action_group_get_action (action_group, "BoldAction")); gtk_widget_show (button); + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); + gtk_box_pack_end (GTK_BOX (menu_box), box, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("Bold:")); + button = gtk_switch_new (); + gtk_container_add (GTK_CONTAINER (box), button); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (button), + gtk_action_group_get_action (action_group, "BoldAction")); + gtk_widget_show_all (box); + merge = gtk_ui_manager_new (); g_signal_connect (merge, "connect-proxy", G_CALLBACK (connect_proxy), statusbar);