Moving menu items to app menu on Mac
Posted: Wed Dec 18, 2013 9:36 pm
I've been asked to investigate options for moving appropriate menu items to the app menu. The item in question is "Check for updates" which is usually in the app menu. While it's easy enough to write an external I think the way the engine trashes all the menus and re-builds them each update will interfere so I think that rules it out. So I've proposed a possible engine solution which may be more work than the client is interested in paying for but here goes:
The idea is to implement a method in the engine to specify which menu items should be moved to the app menu. I'm thinking a multi-dimensional global array property which would default to about and preferences:
The default for this array would be:
I believe this array covers all the data required by MCScreenDC::updatemenubar. The other issue here is this all needs to be updated for Cocoa so there's probably not much point making significant changes without doing that.
The idea is to implement a method in the engine to specify which menu items should be moved to the app menu. I'm thinking a multi-dimensional global array property which would default to about and preferences:
Code: Select all
applicationMenuItems
[item order 1..n]
["menuName"] -> the name of the button the item is in
["tag"] -> a tag for the button
["menuItem"] -> the item - a fallback if the tag isn't found and only
match the length of the menuItem so
for "About Appname" you could use "About"
["removeSeparatorLine"] -> 1...n or -n...-1 or empty
["line"] -> 1...n or -n...-1
Code: Select all
applicationMenuItems
[1]["menuName"] -> "Edit"
["tag"] -> "preferences"
["menuItem"] -> "Preferences"
["removeSeparatorLine"] -> -2
["line"] -> -1
[2]["menuName"] -> "Help"
["tag"] -> "about"
["menuItem"] -> "About"
["removeSeparatorLine"] -> -2
["line"] -> -1