aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlberto Garcia <agarcia@igalia.com>2008-12-02 11:54:16 +0000
committerAlberto Garcia <agarcia@igalia.com>2008-12-02 11:54:16 +0000
commitb82b54e02a777e32c4a3549e448bfa7cff36f601 (patch)
tree9d786aa907557fea55b8b4e0a9bd8900dc5228f0 /examples
parentf7571d1193ac5b790de6190cffe9495d3bd0f79a (diff)
2008-12-02 Alberto Garcia <agarcia@igalia.com>
* examples/hildon-app-menu-example.c (create_menu) Show items after adding them to the menu, as in the future the menu will no longer call gtk_widget_show() on the added items. * src/hildon-app-menu.c: Update example as explained above.
Diffstat (limited to 'examples')
-rw-r--r--examples/hildon-app-menu-example.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/hildon-app-menu-example.c b/examples/hildon-app-menu-example.c
index afb7034..eb2d321 100644
--- a/examples/hildon-app-menu-example.c
+++ b/examples/hildon-app-menu-example.c
@@ -49,6 +49,7 @@ create_menu (GtkWidget *label,
gtk_button_set_label (GTK_BUTTON (button), "Menu command one");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_append (menu, GTK_BUTTON (button));
+ gtk_widget_show (button);
gtk_widget_add_accelerator (button, "activate", accel, GDK_r, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
@@ -56,21 +57,25 @@ create_menu (GtkWidget *label,
gtk_button_set_label (GTK_BUTTON (button), "Menu command two");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_append (menu, GTK_BUTTON (button));
+ gtk_widget_show (button);
button = hildon_gtk_button_new (buttonsize);
gtk_button_set_label (GTK_BUTTON (button), "Menu command three");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_append (menu, GTK_BUTTON (button));
+ gtk_widget_show (button);
button = hildon_gtk_button_new (buttonsize);
gtk_button_set_label (GTK_BUTTON (button), "Menu command four");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_append (menu, GTK_BUTTON (button));
+ gtk_widget_show (button);
button = hildon_gtk_button_new (buttonsize);
gtk_button_set_label (GTK_BUTTON (button), "Menu command five");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_append (menu, GTK_BUTTON (button));
+ gtk_widget_show (button);
/* Filters */
button = hildon_gtk_radio_button_new (buttonsize, NULL);
@@ -78,12 +83,14 @@ create_menu (GtkWidget *label,
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_add_filter (menu, GTK_BUTTON (button));
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
+ gtk_widget_show (button);
button = hildon_gtk_radio_button_new_from_widget (buttonsize, GTK_RADIO_BUTTON (button));
gtk_button_set_label (GTK_BUTTON (button), "filter two");
g_signal_connect_after (button, "clicked", G_CALLBACK (menu_button_clicked), label);
hildon_app_menu_add_filter (menu, GTK_BUTTON (button));
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
+ gtk_widget_show (button);
return menu;
}