add support for MENU_ITEMFLAGS_SKIPINVERT

Able to test:
win/tty
win/win32
win/curses

Unable to test:
win/X11
win/Qt
win/Qt3
win/gem
win/gnome
This commit is contained in:
nhmall
2019-12-23 08:36:44 -05:00
parent c9bc2f5a2a
commit 7012e7046f
18 changed files with 63 additions and 35 deletions
+1
View File
@@ -788,6 +788,7 @@ unsigned int itemflags; /* itemflags such as marked as selected */
G_item->Gmi_selected = preselected ? 1 : 0;
G_item->Gmi_accelerator = ch;
G_item->Gmi_groupacc = gch;
G_item->Gmi_itemflags = itemflags;
G_item->Gmi_attr = attr;
G_item->Gmi_str = copy_of(newstr);
mar_add_menu(window, G_item);
+4 -1
View File
@@ -1783,7 +1783,9 @@ char acc;
for (curr = invent_list; start-- && curr; curr = curr->Gmi_next)
;
for (; page-- && curr; curr = curr->Gmi_next)
for (; page-- && curr; curr = curr->Gmi_next) {
if ((curr->Gmi_itemflags & MENU_ITEMFLAGS_SKIPINVERT) != 0)
continue;
if (curr->Gmi_identifier && (acc == 0 || curr->Gmi_groupacc == acc)) {
if (curr->Gmi_selected) {
curr->Gmi_selected = FALSE;
@@ -1791,6 +1793,7 @@ char acc;
} else
curr->Gmi_selected = TRUE;
}
}
}
/************************* Inv_Handler and Inv_Init