Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] More update control over existing menus #4030

Open
FalcoG opened this issue Jan 23, 2025 · 0 comments · May be fixed by #4031
Open

[v3] More update control over existing menus #4030

FalcoG opened this issue Jan 23, 2025 · 0 comments · May be fixed by #4031
Labels
Enhancement New feature or request

Comments

@FalcoG
Copy link

FalcoG commented Jan 23, 2025

Is your feature request related to a problem? Please describe.

Once a (tray) menu has been created, it can't have new menu items prepended to the menu.

In my use case I need to be able to prepend items and (partially) clear the tray menu after the application was launched.

e.g. a menu upon launch is as such:

  • Lights unavailable
  • Preferences
  • Quit App

menu later gets an update and becomes:

  • Light 1
  • Light 2
  • Light 3
  • Preferences
  • Quit App

This means 1 item gets removed, and 3 items are added.

Describe the solution you'd like

I want to be able to clear a menu, so I can simply construct the items again using multiple appends.

I'm working on a PR.

Describe alternatives you've considered

  1. Tried to add logic to every menu item to destroy them once I need an update. This however complicates the code a lot.
  2. Tried to override a tray menu, but this kept the old menu active.

Additional context

Image Image
@FalcoG FalcoG added the Enhancement New feature or request label Jan 23, 2025
@FalcoG FalcoG linked a pull request Jan 23, 2025 that will close this issue
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant