amantia at kde.org
Fri Jul 1 14:59:07 UTC 2005
On Friday 01 July 2005 15:15, Vladimir Prus wrote:
> On Friday 01 July 2005 16:00, Andras Mantia wrote:
> > > Hmm.. is it possible to disable those? I guess those shortcuts
> > > are specified when katepart creates it's KAction's. Can KDevelop
> > > override those?
> > it is possible to disable them, altough it doesn't make much sense
> > because:
> > - other editors can be used inside KDevelop
> > - Katepart might change its shortcuts in the future.
> Huh, suppose we decide to use Cntrl+Alt+Shift+Win+Menu+'S' for
> "Step". Then:
> 1. What if "other editor" uses exactly same shortcut?
> 2. What if katepart is changed to use this shortcut?
Bad things will happen. :-)
> I realize that clean solution might not be trivial, but some solution
> is certainly needed.
Right, but it would be needed in some upper level (KXMLGUI framework).
> The problem exists *now* -- if two plugins try
> to use the same keyboard shortcut, it's not clear what happens. So,
> katerpart tooks some keys, and we need to invent other shortcuts for
> the debugger in hope that there won't be clashes with some other
Right, and this is not a KDevelop specific problem, but it happens for
every app using KParts, including Konqueror.
Here is an example how to disable/change the shortcut:
KAction *a =
As you see it depends on the name of the action which is in the xmlgui
file for the part.
Other solution is to iterate over all the part's actions that are in
m_part->actionCollection(), check the shortcuts, and it the part is
using a shortcut that you need as well, disable it.
But I find this technique useful in the main application (here the
KDevelop shell), where you want to have global shortcuts not
conflicting with any other plugin shortcut, but if you do the same in a
plugin, it will be a little confusing. Not talking about the fact that
when the plugin is loaded it must iterate over all existing plugin's
actioncollection and should do the same for every later loaded plugin.
With the KDevelop framework I'm not sure that you can get a signal when
a plugin is loaded.
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the KDevelop-devel