diff options
author | B Stack <bgstack15@gmail.com> | 2020-02-06 08:06:11 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-02-06 08:06:11 -0500 |
commit | 4e26d156b01a1054155a275c5bcb30fedfe2506b (patch) | |
tree | d1f1e90ceb7663a4b0f68fb2212c0d09e2c3a073 /mktrayicon.c | |
parent | add -h option and example doc for menu separator (diff) | |
download | mktrayicon-4e26d156b01a1054155a275c5bcb30fedfe2506b.tar.gz mktrayicon-4e26d156b01a1054155a275c5bcb30fedfe2506b.tar.bz2 mktrayicon-4e26d156b01a1054155a275c5bcb30fedfe2506b.zip |
use empty label in menu spec as a separatormenu_separator
Diffstat (limited to 'mktrayicon.c')
-rw-r--r-- | mktrayicon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mktrayicon.c b/mktrayicon.c index 518eccf..626b299 100644 --- a/mktrayicon.c +++ b/mktrayicon.c @@ -397,7 +397,7 @@ outer: // Now create the menu item widgets and attach them on the menu for (int i = 0; i < menusize; i++) { GtkWidget *w; - if (strncmp(onmenu[i].name, "-----", 5) == 0) { + if (0 == strlen(onmenu[i].name) || (!strncmp(onmenu[i].name, "-----", 5))) { w = gtk_separator_menu_item_new() ; } else { w = gtk_menu_item_new_with_label(onmenu[i].name); |