aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-02-06 12:35:15 -0600
committerCody Russell <crussell@canonical.com>2010-02-06 12:35:15 -0600
commitbd5faca60860c60a5a9075b7a7b084f379e3dcf4 (patch)
treeefbfbc216189a930a592cf2beb351a8c9b8e8daf /example
parente892ebeac57c5481a834ba16f902609f226a9ca4 (diff)
downloadayatana-ido-bd5faca60860c60a5a9075b7a7b084f379e3dcf4.tar.gz
ayatana-ido-bd5faca60860c60a5a9075b7a7b084f379e3dcf4.tar.bz2
ayatana-ido-bd5faca60860c60a5a9075b7a7b084f379e3dcf4.zip
Add support for primary/secondary icons.
Diffstat (limited to 'example')
-rw-r--r--example/menus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/example/menus.c b/example/menus.c
index 9877d5e..28b505b 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -12,6 +12,7 @@ main (int argc, char *argv[])
GtkWidget *menuitem;
GtkWidget *root;
GtkWidget *menubar;
+ GtkWidget *image;
gtk_init (&argc, &argv);
@@ -39,6 +40,10 @@ main (int argc, char *argv[])
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
menuitem = ido_scale_menu_item_new_with_range ("Volume", 0, 100, 1);
+ 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);
menuitem = ido_entry_menu_item_new ();