diff options
author | Cody Russell <crussell@canonical.com> | 2010-07-15 11:21:39 -0500 |
---|---|---|
committer | Cody Russell <crussell@canonical.com> | 2010-07-15 11:21:39 -0500 |
commit | 272dafa2317a9ac6602cf595b7571ed5bb96decc (patch) | |
tree | d80d48d02f1c6c1f3c2206cfce2b61e76ba2dd48 /example/menus.c | |
parent | 32093b51ba9486b417083806465a2c0a0556bd0b (diff) | |
download | ayatana-ido-272dafa2317a9ac6602cf595b7571ed5bb96decc.tar.gz ayatana-ido-272dafa2317a9ac6602cf595b7571ed5bb96decc.tar.bz2 ayatana-ido-272dafa2317a9ac6602cf595b7571ed5bb96decc.zip |
Force IdoRange to style itself by name rather than by class. Otherwise they all have the style used by the last one created.
Diffstat (limited to 'example/menus.c')
-rw-r--r-- | example/menus.c | 13 |
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); |