KeyBindings & Friends in KDE 4.0

Olivier Goffart ogoffart at tiscalinet.be
Sat May 22 11:11:54 BST 2004


Le Samedi 22 Mai 2004 03:14, Benjamin Meyer a écrit :
> Most applications have a one line function in them as follows:
>
> /**
>  * Bring up the key configuration dialog.
>  */
> void KTron::configureKeys(){
>   KKeyDialog::configure(actionCollection(), this);
> }
>
> What if we made this a virtual function in KMainWindow?  Then for the
> majority of applications they would only have to do:
>
> KStdAction::keyBindings(this, SLOT(configureKeys()), actionCollection());


I've done a  KXMLGUIFactory::configureShortcuts()  slot.  so it's already 
possible to do

KStdAction::keyBindings(factory(), SLOT(configureShortcuts()), 
actionCollection());

KXMLGUIFactory::configureShortcuts()  does not let to configure only the set 
of actions from the action collection, but every action of kparts or plugins.

But AFAIK, only few applicaiton use that function.
Maybe i should add a @see also  in the KKeyDialog::configure API doc 


> Same with configuring the toolbars...
>
> KStdAction::configureToolbars(this, SLOT(configuretoolbars() ),
> actionCollection(), "configuretoolbars");
>
> Or even go one step further when createGUI is called if a toolbar is
> created the configure and show actions are automaticly added and handled
> same with shortcuts.
>
> Also what about turning  setAutoSaveSettings() on by default rather then
> having every single application have to call it (and some forgetting to)?

Yes, i think the same
cf http://lists.kde.org/?l=kde-core-devel&m=108316630008423&w=2


>
> I am just thinking about things that almost every application re-implements
> on their own even though it could be handled in one place giving the user a
> more common experience across KDE.
>
> If this sounds like a good idea I'll add it to the kdelibs TODO list for
> KDE4.

Is it too late for KDE 3.3 ?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040522/e597e4fe/attachment.sig>


More information about the kde-core-devel mailing list