KDevelop UI cleanup initiative

Sascha Cunz scunz at ng-projekt.de
Sun May 30 21:16:10 UTC 2004


Now, for this.
> > > > - we should rethink all our default short cuts. There are some that
> > > > are so damn ugly... Depending on the type of keyboard you use,
> > > > Alt+Ctrl+Shift+L needs two persons to press :)
> > > Well.. yeah. This particular shortcut I believe is defined by KMDI, but
> > > I guess we could override it. We'd just have to do it in a way that
> > > maintains any user override, if such exist. Nasty.
> > > In general, the way we just "get" shortcuts from embedded kparts is a
> > > problem. A problem that needs solving, but probably not sanely so at
> > > the KDevelop level. IMHO, one sane approach (at least to some degree)
> > > would be for the kpart to not define shortcuts for its actions and
> > > leave this up to the embedding app. At least a way to easily clear the
> > > default shortcuts would be nice (maybe this already exists, I don't
> > > know all the ins and outs of the XMLGUI architecture)
> > hmm, this sounds like you want to add a big constraint to what a KPart
> > may expose. Maybe this could break a lot of stuff; even outside kdevelop.
> Not at all.. I don't want any contraints on exposed features or actions, I
> just don't want to be forced into using the part's set of shortcuts. As we
> see time and again, this creates problems.
> Disregarding version issues, the solution might be as easy as this:
> Let the embedding app decide for the part what ui.rc file it should work
> with.
> This would let the embedder (us) decide the layout of the part's menus and
> override its shortcuts.
> Is this doable? Maybe already today? Is the version problem solvable?

As i already said, i have to disagree in this point.
To get it together in few words: You want to tell the part what ui.rc it has 
to use? And you want this in order to tell it what shortcuts it shall use?

As shortcuts are not stored in ui.rc file by default, i doubt this would work. 
But that's not the main point here. If i understand you correctly (thus my 
summary above is right), then this is totaly contrary to what XMLGUI+KParts 
is meant for:

The embedder should need no clue of what it embeds - and vice versa. One could 
in theory come and port mozilla to be a kpart; and then use it as a 
replacement for the KHTML Part. Well, this is bloody theory; but it tells how 
it was meant.

If we could do it like your suggestion, then we could simple create a common 
projectmanagerui.rc and feed every project manager with it. This won't work 
out for the same reasons: every project manager has different actions - so 
how could we create a ui that is sane for all of them?

Back to the default shortcuts: They are assigned in code. Actually in the 
KAction constructor. I have no clue where they are stored, if one changes 
them. But i doubt, that it is the ui.rc file ( because then they could be 
stored there right from the start ?!? )

So we clearly need a different proposal. But i have no one at my fingertips 
currently.

But maybe shortcuts should be "allocated" in a way, that the embedder is asked 
if a certain part can allocate a certain short cut of it's usage. Default 
implementation of course would allow every short cut to be allocated. 
KDevelop could then forbid some short cuts to be allocated by certain parts.

Sascha





More information about the KDevelop-devel mailing list