Priority: P3: Somewhat important
Affects Version/s: 5.15.2, 6.2
Fix Version/s: None
Component/s: GUI: Menus
my app does NOT use ui designer to construct the menu bar, it reads a json file and constructs the menus based on what is in the json file. this is a requirement and no i can't change it.
so when attempting to set up the application menu, i would like to have it appear like this:
to be clear, we need the three "About" items to appear at the top, one after the other, THEN a separator THEN "Preferences" etc. this is also a requirement that can't be changed.
the problem is that any item (except the first) with the word "about" in it will throw everything off.
If I attempt to construct the menu as it is above, it ends up like screenshot 1. Not only is this wrong visually, but the first "about" action is wrong: picking the first "About kJams 2 Debug…" invokes the "about open source" action, although other items perform their stated action.
if i do NOT have the word "about" in the latter two items, say i use the word "regarding" instead, then it looks like screen shot 2, but now there's this extra separator which i did not ask for.
so then i must use Cocoa calls directly to remove that separator item, since it is not in the Qt model of the menus, and i finally get closer to what i'm looking for, see screen shot 3, the only problem now is the word "Regarding" instead of "About".
strangely, to get rid of the extra separator, by trial and error i discovered i had to remove item index 2 (base zero, as in the first item is number zero), but item index 2 from screen shot 2 is "Regarding Qt", NOT the separator, which is index 1 (index 0 is "About kJams 2 Debug").
This led me to logging what the menu models have in mind, which lead to the following CRAZY output. note this is from BEFORE i remove the "separator", so it corresponds to "screen shot 2". also note in these logs the indexes are base 1, not base 0, meaning the first item is 1.
so i have to ask: what the HECK is going on here?
footnote: i know i must make this call for items to even appear in the app menu, the actual visual menu that is displayed:
I do that only up to "preferences". i do add the rest of the items, ie: the separator and the Quit (Exit) menu items, but i do NOT set their menu role, so they don't show up in the visual menu, which is what i want.