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

Add a API to add/remove items to the "Tools" menu #6065

Closed
wants to merge 2 commits into from
Closed

Add a API to add/remove items to the "Tools" menu #6065

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 7, 2016

Make possible add and remove items to the "Tools" menu.
The API is based on my initial proposal but i changed some things during the implementation:

  • I removed the has_plugin_menu_item(I don't added it since other functions don't have it's has_* counterpart).
  • All function were renamed to use *_tool_* instead of *_plugin_*, IMO this way it's clear that the functions are related to the "Tools" menu.
  • The int ID parameter of add_tool_menu_item was changed to Variant ud, used for the callback function.
  • The callback format now is callback(Variant ud), which made the code simpler and more flexible.
  • The name format for the items, were changed from "my_category/my_item"/"MyCategory/MyItem" to ANY string_Format/My Item Name where the first slice is the item category, this way the name parameter is friendlier to translation(e.g. "category/"+TTR("My Item Name") or vformat("categoty/%s", TTR("My Item Name"))).

Closes #1429.

@akien-mga
Copy link
Member

There are now merge conflicts, could you have a look @TheHX?

@ghost
Copy link
Author

ghost commented Sep 3, 2016

Sorry for the delay, rebased to current master.

@akien-mga
Copy link
Member

Sorry, merge conflicts again. I promise I'll have a look at it for merging then, nobody expressed any concern about the added feature.

Also note that your commits are not linked to your GH account, you might want to fix that too (or not, it's up to you).

@akien-mga
Copy link
Member

Ping ;)

@akien-mga akien-mga modified the milestones: 3.0, 2.2 Jan 14, 2017
@akien-mga
Copy link
Member

akien-mga commented Jan 14, 2017

Rebased and merged it myself in e427ece. Please check it still works as intended in the current master branch :)

Edit: Wait, something went wrong.

@akien-mga akien-mga closed this Jan 14, 2017
@akien-mga
Copy link
Member

Alright, fixed for real with b24b52d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants