aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-03-26 16:25:04 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-03-26 16:25:04 -0500
commit49c57fdc547b91bdad22ad4c7b36d6000ff023ee (patch)
treefb095273c092fba0c44e0a9b6ab52825730ba7fb /example
parent259c7ad0334a5c04873e4b62eb04890c76813fd0 (diff)
downloadayatana-ido-49c57fdc547b91bdad22ad4c7b36d6000ff023ee.tar.gz
ayatana-ido-49c57fdc547b91bdad22ad4c7b36d6000ff023ee.tar.bz2
ayatana-ido-49c57fdc547b91bdad22ad4c7b36d6000ff023ee.zip
add idousermenuitem to the examples
Diffstat (limited to 'example')
-rw-r--r--example/menus.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/example/menus.c b/example/menus.c
index 5687b8e..b303cf5 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -4,6 +4,7 @@
#include "idocalendarmenuitem.h"
#include "idoentrymenuitem.h"
#include "idoswitchmenuitem.h"
+#include "idousermenuitem.h"
#include "config.h"
static void
@@ -92,10 +93,52 @@ main (int argc, char *argv[])
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);
+ /**
+ *** Users
+ **/
+
+ menuitem = gtk_separator_menu_item_new ();
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = ido_user_menu_item_new ();
+ g_object_set (menuitem,
+ "label", "Guest",
+ "icon", NULL,
+ "is-logged-in", FALSE,
+ "is-current-user", FALSE,
+ NULL);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = ido_user_menu_item_new ();
+ g_object_set (menuitem,
+ "label", "Bobby Fischer",
+ "icon", "/usr/share/pixmaps/faces/chess.jpg",
+ "is-logged-in", FALSE,
+ "is-current-user", FALSE,
+ NULL);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = ido_user_menu_item_new ();
+ g_object_set (menuitem,
+ "label", "Linus Torvalds",
+ "icon", "/usr/share/pixmaps/faces/penguin.jpg",
+ "is-logged-in", TRUE,
+ "is-current-user", FALSE,
+ NULL);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = ido_user_menu_item_new ();
+ g_object_set (menuitem, "label", "Mark Shuttleworth",
+ "icon", "/usr/share/pixmaps/faces/astronaut.jpg",
+ "is-logged-in", TRUE,
+ "is-current-user", TRUE,
+ NULL);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+
/* Add the menubar */
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), root);