diff options
author | Robert Tari <robert@tari.in> | 2023-04-04 20:53:23 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-05 23:31:52 +0200 |
commit | 876a9fa2754a7defcec201d726f8f502ae239a2c (patch) | |
tree | df332d910d3c6742841c56bfd7795a45ffdec164 /example | |
parent | fc636cea8077765e5f35603960bc64928269f4f0 (diff) | |
download | ayatana-ido-876a9fa2754a7defcec201d726f8f502ae239a2c.tar.gz ayatana-ido-876a9fa2754a7defcec201d726f8f502ae239a2c.tar.bz2 ayatana-ido-876a9fa2754a7defcec201d726f8f502ae239a2c.zip |
Add level menu item
Diffstat (limited to 'example')
-rw-r--r-- | example/menus.c | 11 |
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); |