proposal for kaction api change
rodda at kde.org
Sat May 6 02:52:56 BST 2006
On Saturday 06 May 2006 02:25, Jason Harris wrote:
> On Friday 05 May 2006 16:29, Hamish Rodda wrote:
> > > The CustomShortcut is now null, and so the program reverts to the
> > > "default" shortcut that was defined in the init code ("Ctrl+N").
> > This I again disagree with for the reason above. You should have to set
> > the CustomShortcut to the same as the default shortcut, otherwise you
> > could not disable the default shortcut.
> I think you still have the point of view where CustomShortcut is always the
> one that is actually used, and it's just a question of whether or not it
> matches the Default. I am proposing a shift in the way shortcuts are
> handled internally, such that the Default shortcut is the one that is
> actually used...by default. The Custom one is only used when it is
> defined. This is more consistent with what the words "Default" and
> "Custom" actually mean.
> What exactly do you mean by "disable the default shortcut"?
To assign no shortcut to the action using the keyboard shortcut gui. In your
scheme, this would require KShortcut or KAction to distinguish between empty
> In my imagined
> scheme, the Default is always there, it is simply overridden if a Custom
> shortcut has been defined, and when the Custom is undefined (i.e., set to
> null), the shortcut reverts to the default. What is the use case for
> needing to "disable" the default in some other way?
1) User doesn't want a shortcut for the action (eg. doesn't want to
accidentally trigger it). I use this to turn off some kdevelop shortcuts I
2) User wants to use the shortcut for a different action. KDE needs to assign
no shortcut to this action in order to assign the shortcut to the other
So, either we add unsetCustomShortcut() to KAction (and make KAction track
whether it has been defined), or KShortcut gets a distinction between empty
and null, or we leave things as is (with perhaps some naming changes).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel