[RFC] Context-Menu Handling in KDevelop4
Matt Rogers
mattr at kde.org
Tue Apr 3 21:56:57 UTC 2007
On Apr 3, 2007, at 2:15 PM, Andreas Pakulat wrote:
> Hi,
>
> so I finally came around to ask Adam what he meant with the comment on
> KDevelop::MainWindow::fillContextMenu().
>
> His response was:
> ,----
> | Well, kdevelop has this notion of global context's such as 'file
> context'
> |
> | If a plugin wished to add an action to the context menu shown
> whenever a file
> | is selected it would just call:
> |
> | 'KActionCollection *ICore::actionCollection
> (ICore::FileContext)'
> |
> | or something and retrieve the action collection for that context
> as denoted by
> | some enum. The plugin could then plug it's actions into it or
> something.
> |
> | Hadn't really thought it out.
> `----
>
> As can be seen this is just an idea atm, so comments, thoughts,
> specifications for this are welcome.
>
> Also I'd like to discuss wether we should follow this idea or do it
> the
> same way as in KDevelop3, where each plugin could provide a
> fillContextMenu member function.
>
> Personally I think the actionCollection way is cleaner and we don't
> have
> to iterate over all plugins asking them for additions to the context
> menu.
>
> Andreas
>
I prefer the actionCollection way as well. Do you have a proposed
patch for how it would work when writing code to use it?
--
Matt
More information about the KDevelop-devel
mailing list