[RFC] Context-Menu Handling in KDevelop4

Andreas Pakulat apaku at gmx.de
Wed Apr 11 12:34:28 UTC 2007


On 03.04.07 21:15:36, Andreas Pakulat wrote:
> 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.

Somehow this discussion came to halt with no obvious solution for one or
the other approach.

Andreas

-- 
Questionable day.

Ask somebody something.




More information about the KDevelop-devel mailing list