[RFC] Context-Menu Handling in KDevelop4

Andras Mantia amantia at kde.org
Wed Apr 4 09:36:38 UTC 2007


On Wednesday 04 April 2007, Andreas Pakulat wrote:
> On 04.04.07 10:11:03, Andras Mantia wrote:
> > On Tuesday 03 April 2007, Andreas Pakulat wrote:
> > > 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.
> >
> > I'm just thinking how will be possible to control the order of
> > appearance of the menu items.
>
> hm, how about KActionCollection::actions(), without looking into the
> code I'd assume it returns the actions in the order they were added.
> I might be wrong here of course.

This is not documented, and I'm not sure we can ely on it.

> 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.

I'm not against the actionCollection, I just want to know how can we 
give more freedom to plugin developers.

Andras


-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070404/6c0e8f81/attachment.sig>


More information about the KDevelop-devel mailing list