It isn't as bad as it looks. The im_menu stuff all relates to a special
you can discard it. The rest you can replicate as is (with the obvious
Here is a quick summary of how to create a context menu for a tool:
1) Create a get_popup handler similar to gimp_text_tool_get_popup.
2) Create menu actions by creating a file similar to
3) Create menu commands by creating a file similar to
4) Define the menu structure by creating a file similar to
It should be possible to do most of this without a very deep understanding
of the code.
Gimp-developer mailing list