Hi,
i have a tool that works on packages. So far i added a wizard to the world menu, but i would rather add a menu item to the Nautilus context menu on selected packages - is this possible? Best regards, Martin. |
It is :)
And I would even say it is not complicated :P Here is an example from Nautilus AbstractNautilusUI class>>packagesMenu: aBuilder <contextMenu> <nautilusGlobalPackageMenu> | package target | target := aBuilder model. (package := target selectedPackage) ifNil: [ ^ target ]. (aBuilder item: #'Browse scoped') keyText: 'b, s' if: Nautilus useOldStyleKeys not; action: [ target restrictedBrowsePackage ]; order: 1000; help: 'Open a browser on a restricted view'; withSeparatorAfter. :) Ben On 12 Nov 2013, at 15:41, MartinW <[hidden email]> wrote: Hi, |
Quite easy indeed. Thank you.
Is there any system behing the ordering of menu entries? Martin.
|
You can give them a priority, then it depends of the other items :)
Ben On 13 Nov 2013, at 17:31, MartinW <[hidden email]> wrote: Quite easy indeed. Thank you. |
In reply to this post by Benjamin Van Ryseghem (Pharo)
I have one follow-up question trying to understand how this works:
I see that <nautilusXXXMenu> is used in AbstractNautilusUI to build the menus — but why is <contextMenu> here? Also the code seems to work all the same without <contextMenu>? Martin.
|
No idea …
I do not added it, so I can not tell
Ben On 02 Dec 2013, at 15:25, MartinW <[hidden email]> wrote: I have one follow-up question trying to understand how this works: |
Free forum by Nabble | Edit this page |