VCS actions in context menus

Andreas Pakulat apaku at gmx.de
Fri Apr 2 21:25:48 UTC 2010


On 02.04.10 16:56:26, Nicolas Alvarez wrote:
> Andreas Pakulat wrote:
> > On 02.04.10 16:14:22, Nicolas Alvarez wrote:
> >> KDevelop::ContextMenuExtension::VcsGroup is used by several views to get
> >> all the VCS-related actions. Several views move all actions from that
> >> group into a "Version control" submenu in their context menus.
> >> 
> >> However, every single VCS plugin I have seen uses ExtensionGroup to add
> >> its actions, so there are never any actions in the VcsGroup.
> >> 
> >> I attach a patch that puts the actions in the right menu (for VCS plugins
> >> in kdevplatform; I didn't look at playground plugins yet).
> >> 
> >> It's definitely the right thing to do
> > 
> > Sorry, but its not.
> 
> Well, it's certainly better than having a group that no VCS uses and every 
> view expects, right? ;)

Thats all stuff from back when things where different. Once we remove
the group, then we'll also drop this code.
 
> > We've decided to have separate submenus for each VCS
> > system as many have special actions anyway. Additionally users often
> > expect their vcs actions in a menu named after the vcs they've chosen.
> > So we probably should drop the VcsGroup completely.
> 
> Why remove the group? Why not keep the VCS actions in VcsGroup, and change 
> the views to append them to the menu normally, without adding the submenu?

How should the project manager view decide which actions from the vcs
group should be added top-level and which should go into a submenu? You
cannot add all actions that you get via the context-menu-extension into
the top-level. Hence the logic is to create submenu's for any group that
has more than 1 item in it.

So the only thing that would change is that the "Subversion" or "CVS" or
"Git" menu item is in a different contextmenuextension group.

> I think it's better to keep them separated. Someone might want to show VCS 
> actions only, and not actions from other extensions...

IMHO that would be a bug. If there's some plugin that can provide
context menu items for the current element in a view, then those should
be shown. Else users will be confused, for example lets take a simple
file. Its visible in the project tree, the buildset widget and also the
document view and the filesystem view. For the user all 4 are the same
file, so they want the same file-based actions in all places.

Andreas

-- 
Tomorrow, you can be anywhere.




More information about the KDevelop-devel mailing list