aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/menus.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/example/menus.c b/example/menus.c
index 1786697..eff6a9f 100644
--- a/example/menus.c
+++ b/example/menus.c
@@ -7,6 +7,7 @@
#include "idoswitchmenuitem.h"
#include "idousermenuitem.h"
#include "idoremovablemenuitem.h"
+#include "idolevelmenuitem.h"
static void
slider_grabbed (GtkWidget *widget, gpointer user_data)
@@ -150,6 +151,16 @@ main (int argc, char *argv[])
idoRemovableMenuItemUseMarkup(IDO_REMOVABLE_MENU_ITEM(menuitem), TRUE);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
+
+ /* Level */
+ menuitem = ido_level_menu_item_new();
+ idoLevelMenuItemSetText (IDO_LEVEL_MENU_ITEM (menuitem), "Some battery level");
+ GIcon *pIcon = g_themed_icon_new_with_default_fallbacks ("battery");
+ idoLevelMenuItemSetIcon (IDO_LEVEL_MENU_ITEM (menuitem), pIcon);
+ idoLevelMenuItemSetLevel (IDO_LEVEL_MENU_ITEM (menuitem), 50);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
/* Add the menubar */
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), root);