-
Notifications
You must be signed in to change notification settings - Fork 391
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
Allow multiple submenus (Issue #13 & Issue #26) #36
Conversation
Moved the submenu creation into separate methods which allows for a recursive menu generation and therefore multiple submenus
Could you please share a sample config file to demonstrate the nested menu functionality? I was unable to get it working. |
I've added a sample section to the default config, I opted to use the Dictionary within Array syntax you used for the "hosts" property. Maybe we could change the group definition into something similar to the item definition - to add additional properties! |
Updated the path expansion to work with ~
I added a sample for the icon, I noticed that it won't expand tildes so I added that too. |
I downloaded the newest version from the website (which I assume is the newest), and I am unable to get the sub-submenu's working. Here is what I was hoping to support: { Is this possible? |
Yes it is possible, just that the current master doesn't have this pull request embedded ;-) And you are missing a comma: "cmd": "" I've merged it in mine and you can download the code here: https://github.com/Thoro/shuttle |
I typed that in and missed that, sorry! I just downloaded and tested and its working perfectly. Thank you! You guys rock! I will keep testing and open tickets if I find anything. |
@thoro Just tested it. Works well. 👍 Would you have any desire to expand this same functionality to support submenus with .ssh/config files?
|
Yeah, but in that move I'd like to add subclasses for a Menu and a MenuItem, to better support future functionality. I'm having my eye on automation through applescript and a bunch of additional properties! |
The ssh_config parsing now creates an equivalent to the parsed JSON content and appends it to the read config. The parsed content then gets modeled into a Class-Hierarchy - for future extensibility. Finally the Class-Hierarchy is converted into a NSMenu tree
I added a bunch of functionality and prepared it for future extension via a class hierarchy for the menu items, I've also added "sort_alphabetical" as a option as requested in #47 - but maybe we have to rename my option (I think the name is not quite right) |
Nested menus have now been added in 89e05b8. See a couple example config files to see how they can be implemented. @thoro Thank you very much for your contribution. |
Moved the submenu creation into separate methods which allows for a
recursive menu generation and therefore multiple submenus