From 4e26d156b01a1054155a275c5bcb30fedfe2506b Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 6 Feb 2020 08:06:11 -0500 Subject: use empty label in menu spec as a separator --- mktrayicon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mktrayicon.c') 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); -- cgit