[RFC] Context-Menu Handling in KDevelop4

Andreas Pakulat apaku at gmx.de
Wed Apr 4 10:00:36 UTC 2007


On 04.04.07 12:36:38, Andras Mantia wrote:
> On Wednesday 04 April 2007, Andreas Pakulat wrote:
> > Also there are action groups, so rather than adding individual
> > actions a plugin should add an action group with all its actions. And
> > then we only have to make sure the order is the same on each
> > invocation of the context menu.
> 
> Another question remains though: what about separators? A plugin might 
> provide several actions for e.g files, but they might need some 
> grouping.

Well, the order is defined by the order in which the actions are added
to the group. I don't think anybody wants to see radio-buttons or such
stuff on context menus (as thats what a actiongroup seems to be meant
for). So adding a separator at a specific position in will work.

OTOH we could add our own QAction group subclass which could wrap a
standard QAction and provide a plugin-name and an ordering number. So
when building a context menu we can group stuff from the same plugin and
order it using the number.

Andreas

-- 
You will gain money by a fattening action.




More information about the KDevelop-devel mailing list