diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-05 23:33:50 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-05 23:33:50 +0200 |
commit | e74e767ad6c67788fd7ef3bb45a5d6a722c71e12 (patch) | |
tree | df332d910d3c6742841c56bfd7795a45ffdec164 /example | |
parent | c730328e1986ff82a4bec5b26a1055b4ea4c0846 (diff) | |
parent | 876a9fa2754a7defcec201d726f8f502ae239a2c (diff) | |
download | ayatana-ido-e74e767ad6c67788fd7ef3bb45a5d6a722c71e12.tar.gz ayatana-ido-e74e767ad6c67788fd7ef3bb45a5d6a722c71e12.tar.bz2 ayatana-ido-e74e767ad6c67788fd7ef3bb45a5d6a722c71e12.zip |
Merge branch 'tari01-pr/level-item'
Attributes GH PR #65: https://github.com/AyatanaIndicators/ayatana-ido/pull/65
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); |