Gooey icon indicating copy to clipboard operation
Gooey copied to clipboard

Add menu items that can invoke functions

Open SteveKlein opened this issue 2 years ago • 1 comments

It would be nice to be able to add a menu item that invokes a function in the client app.

Example:

def openLogFolder():
    subprocess.run(["explorer", "C:\\logs"])

@Gooey(menu=[{'name': 'Open', 'items': [{'type': 'Action', 'menuTitle': 'Log Folder...', 'function': openLogFolder}]}])

I can make a pull request as I have already implemented it locally.

SteveKlein avatar Mar 07 '22 20:03 SteveKlein

It would be nice to be able to add a menu item that invokes a function in the client app.

Example:

def openLogFolder():
    subprocess.run(["explorer", "C:\\logs"])

@Gooey(menu=[{'name': 'Open', 'items': [{'type': 'Action', 'menuTitle': 'Log Folder...', 'function': openLogFolder}]}])

I can make a pull request as I have already implemented it locally.

@SteveKlein Maybe this is too late to the party but if you still have this available would you be open to sharing?

muraii avatar May 03 '24 15:05 muraii