aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/menus.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/example/menus.c b/example/menus.c
index e244c40..a2647bb 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -67,6 +67,19 @@ main (int argc, char *argv[])
menuitem = ido_entry_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+ menuitem = ido_scale_menu_item_new_with_range ("Volume",
+ IDO_RANGE_STYLE_SMALL,
+ 65, 0, 100, 1);
+ ido_scale_menu_item_set_style (IDO_SCALE_MENU_ITEM (menuitem), IDO_SCALE_MENU_ITEM_STYLE_IMAGE);
+ image = ido_scale_menu_item_get_primary_image (IDO_SCALE_MENU_ITEM (menuitem));
+ gtk_image_set_from_stock (GTK_IMAGE (image), GTK_STOCK_NEW, GTK_ICON_SIZE_MENU);
+ image = ido_scale_menu_item_get_secondary_image (IDO_SCALE_MENU_ITEM (menuitem));
+ gtk_image_set_from_stock (GTK_IMAGE (image), GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ g_signal_connect (menuitem, "slider-grabbed", G_CALLBACK (slider_grabbed), NULL);
+ g_signal_connect (menuitem, "slider-released", G_CALLBACK (slider_released), NULL);
+
/* Add the menubar */
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), root);