fix all menu items have a check box (gtk)
This commit is contained in:
committed by
Dmitry Mikushin
parent
2d4e78c1f2
commit
2348a1a5c8
4
tray.h
4
tray.h
@@ -49,9 +49,11 @@ static GtkMenuShell *_tray_menu(struct tray_menu *m) {
|
||||
item = gtk_menu_item_new_with_label(m->text);
|
||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM(item),
|
||||
GTK_WIDGET(_tray_menu(m->submenu)));
|
||||
} else {
|
||||
} else if (m->checked) {
|
||||
item = gtk_check_menu_item_new_with_label(m->text);
|
||||
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), !!m->checked);
|
||||
} else {
|
||||
item = gtk_menu_item_new_with_label(m->text);
|
||||
}
|
||||
gtk_widget_set_sensitive(item, !m->disabled);
|
||||
if (m->cb != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user