[RFC] Context-Menu Handling in KDevelop4

Andreas Pakulat apaku at gmx.de
Tue May 8 12:12:03 UTC 2007


On 08.05.07 13:34:43, David Nolden wrote:
> On Tuesday 08 May 2007 12:04:37 Jens Herden wrote:
> > > I'm not sure yet how to trigger this, but ideally I'd like to get a
> > > QList<QAction*> from each plugin and eventually a QString. Then the
> > > context menu will have an entry with the QString that has as a submenu
> > > the list of actions.
> >
> > Please consider the situation when you want only one action added to the
> > menu. In this case it would be not nice to create a submenu with exactly
> > one action.
> >
> > Jens
> 
> It would be nice if the context-menu could(at least optionally) be build 
> dynamically, considering what action-groups are used most often.
> 
> I think too that the kdevelop-3 context-menu is very bloated, it's very long, 
> and I haven't ever touched 90% of the entries.
> 
> Andreas's aproach with a QString and QAction should be quite suitable for 
> this: The shell could automatically keep track of when what QAction has been 
> triggered by connecting to the QAction's signals, and then use that 
> statistical data to build a structure, where all groups could be put into 
> sub-menus, and the most popular groups(for me it would probably be the 
> navigation-menu) could additionally be shown in a consistent order at the top 
> of the context-menu.
> 
> That way everyone could easily access the entries he uses most, while still 
> being able to access the other ones.

Sounds like a good idea, what I didn't invest time in yet is to find out
wether Qt4 menu's are able to have scrolling arrows. I tried to do that
with Qt3 and while it worked to some extent the drawing was pretty much
broken. If we have this it would be really helping with this
ordering-idea, because then we don't have to hide unused items in a
separate submenu, but can just leave them at the bottom and the user can
then scroll down the list.

Andreas

-- 
A visit to a fresh place will bring strange work.




More information about the KDevelop-devel mailing list