[patch] Shortcut schemes for any KDE application (specifically for KDevelop, plugins and Kate Part)

Alexander Dymo dymo at ukrpost.ua
Wed Mar 5 08:10:34 UTC 2008


On Wednesday 05 March 2008 01:28:11 Andreas Pakulat wrote:
> a) Creating a new scheme, changing two shortcuts. Then switching back to
> Default and again to the new scheme the dialog is empty and apparently
> thats also what the scheme file stores as cancelling and re-opening the
> dialog doesn't bring up any shortcuts

> b) cancel doesn't undo a scheme change, i.e. choosing a different scheme
> from the combobox and then cancelling should revert back to the
> previously selected scheme
Agree. But there's one more alternative - we can have separate scheme 
selection dialog where stuff like this will be easier to implement. 

The way shortcut dialog works now, I think we can ask the user if he wants to 
save or cancel his shortcut changes when changing the scheme. Right now I 
silently cancel the changes. Without save/cancel on scheme change it's quite 
hard to implement scheme selector inside the dialog.

> c) the "export to file" doesn't do anything for me
Yep, I haven't implemented it :)

> d) what does the "save these shortcuts as default for this theme" thing
> do? Doesn't it automatically store any changes to the shortcuts editor
> in the scheme? IMHO it should
Currently scheme can live in:
- <guiclientname><schemename>shortcuts.rc files (either global or local)
- local <guiclientname>ui.rc file (user settings)

When the user creates the scheme and assigns shortcuts, they are saved to the 
usual user settings config file (<guiclientname>ui.rc) in a dedicated xml 
element like:
 <ActionProperties scheme="emacs" >
  <Action shortcut="Ctrl+X,K" name="file_close" />
 </ActionProperties>

This "save as default" menu moves the contents from user settings file to the 
local scheme settings file <guiclientname><schemename>shortcuts.rc.

I'm not sure this is needed at all, but at least until I implement "export" 
feature, this stuff is the only way to exchange schemes... Yeah, I 
think "export" should be enough...

> e) The combobox is empty initially, shouldn't it have the "Default"
> entry? (or is this because I removed the existing scheme files and
> restarted kate? I didn't find any other place to change back)

Hmm, how did you get that? You should have seen the "Default"... I'll try to 
reproduce this in the evening.




More information about the KDevelop-devel mailing list