wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.1k stars 1.15k forks source link

Support more menu roles #921

Open leaanthony opened 2 years ago

leaanthony commented 2 years ago

See https://www.electronjs.org/docs/latest/api/menu-item/#roles

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

leaanthony commented 2 years ago

Reopen

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

binyamin commented 2 years ago

@leaanthony I assume you still want this open. Maybe stale-bot should ignore issues which have a certain label (eg "not-stale")

SubhanShah1 commented 1 year ago

Hi! Is this issue still up for grabs?

leaanthony commented 10 months ago

This is now being deferred to v3. But yes it's up for grabs if you want it :-)

SubhanShah1 commented 9 months ago

I'd still like to do this. Just have a few questions, have went through the code a bit to try and understand what's happening and it seems like the application menu (SetApplicationMenu)is only being set for Darwin? The definitions exist for Windows and Linux but I don't see them being used anywhere.

I saw that as I was trying to figure out how the role value interacts with the application (i.e how does the OS know what menu to show). Now I'm wondering if the purpose of the ticket is just to add the roles for future use or if it's to add them but it's okay that they only get used on Darwin (which I'm assuming is MacOS only)?

leaanthony commented 9 months ago

SetApplicationMenu is on all platforms. Darwin has this concept of an "application menu" which is the app specific one with CMD+Q Quit menu item if that's what you mean? Roles are a group of menu items. Like Electrons: https://www.electronjs.org/docs/latest/api/menu-item#roles

sbshah97 commented 7 months ago

Hi would love to try this one out. Chatting more in #development on discord.