Extensible context menus
apaku at gmx.de
Mon Mar 10 13:49:07 UTC 2008
On 10.03.08 13:19:15, Jakob Petsovits wrote:
> On Saturday, 8. March 2008, Andreas Pakulat wrote:
> > One problem I see with this is order of actions. Basically the order of
> > the actions might change after each start of kdevelop, as other plugins
> > might get loaded that might contribute to an already populated menu.
> > Ideas how to solve that?
> The classic Drupal influenced mindset's approach: weights.
Aah, indeed. Why didn't I think of that :)
> If a ContextMenuContribution is supposed to be used in multiple contexts, that
> context (QString uniqueContextIdentifier?) would probably need to be passed
> as parameter for the weight method.
The function that fetches the contributions from the plugins will still
provide an instance of IContext, so plugins know the context to which
they shall provide actions and can store the context if needed for
properly handling action activation.
Today is what happened to yesterday.
More information about the KDevelop-devel