KDevelop UI cleanup initiative

Fabio Fracassi f.fracassi at gmx.net
Mon May 31 19:02:43 UTC 2004


On Sunday 30 May 2004 20:55, Jens Dagerbo wrote:

[Big Snip]

> > 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.
> 
> Yes, this doesn't sound too bad. Some mechanism like this might work. But 
this 
> is KDE4 stuff at the very least and would take fundamental modifications to 
> the framework.
>

Nevertheless I belive it is a very important issue to address. This would 
correct many anoying glitches, in Kdevelop in particular and in KDE in 
general.

The architecture for such a thing is not to complicated. 
The KPart registers any action (with the default shortcut.) which it offers. 
The embedding application then checks wether it "knows" about the action in 
which case it assigns a Shortcut to the action. If the action is unknown to 
the embedding app, the supplied default shortcut is used if it doesn't clash 
with any other shortcut.

The same thing shold then be done on the Frameworklevel, that means in our 
example, that Kdevelp then registers all its actions (its own, and the ones 
it proviedes throug KParts) with KDE (or some variant of KHotkeys.) which 
works exactly as above.

What does this architecture archive? 
It avoids Shortcut clashes.
It would make it possible to globaly use Shortcut -Themes.
The embedding app can override the shortcuts of its Parts, but doesn't have to 
do so.

Where is the catch?
The whole thing depends on the registration of the Actions, which would need 
suitable names. These names have to be standardized, so that the same Action 
gets the same shortcut throughout the app (framework). Let's say that we want 
to register an Shortcut for Paste then the embeding app has to know about the 
name the KPart has used to register Paste.
The Problem is that a suitable Standard has to be found and agreed upon KDE - 
wide (Or even on freedesktop.org), like it is done with icons, menu entrys, 
mouse cursor icons, etc.
 

I hope I made a bit of sence, and that my post is not OT here.
Since this is wider than KDevelop, where would be the right place to suggest 
such an architecture?

Fabio
















More information about the KDevelop-devel mailing list