kxmlgui shortcuts regression

Andreas Pakulat apaku at gmx.de
Mon Sep 22 13:07:44 BST 2008

On 22.09.08 10:38:15, David Faure wrote:
> On Sunday 21 September 2008, Michael Jansen wrote:
> > > > Could you please give a use case? I have no idea what you are talking
> > > > about. But perhaps david can help you as in "know that beast
> > > > kxmlguiclient".
> > >
> > > Lets take KDevelop (though in theory even konqueror with multiple tabs
> > > should do):
> > >
> > > - open two file, you get two tabs. Lets say fileA and fileB
> > > - Focus fileA and open shortcuts editor
> > > - change a shortcut thats specific for the xmlgui-client - i.e. not part
> > >   of the application. In my example I'm changing "Capitalize" which is
> > >   a katepart shortcut, to Meta+Ctrl+C
> > > - close the editor via "ok"
> > > - check wether the shortcut works, for me it does
> > > - Switch to fileB by clicking on the tab or using Alt+Left/Right,
> > >   doesn't matter
> > > - try the shortcut, it doesn't work. Go to the shortcuts editor and see
> > >   that the shortcut for the action is back to Default, i.e. Ctrl+Alt+U
> > >   in the case of Capitalize
> Right.
> But how is this a "regression"?
> Did this really work in KDE3? I have very strong doubts about that.

At least in KDevelop/KDE3 it does work, that is shortcuts are applied to
all kate editors. However I'm not 100% sure wether we used multiple kate
xmlgui clients there or wether we re-used the same all the time. Lets
assume this is not a regression.
> > > Now I'm not sure where the error is in this case, wether its the xmlgui
> > > framework not notifying its clients about changes in the shortcuts, or
> > > the clients not doing the right thing or wether the app is responsible
> > > for notifying the clients. But somethings wrong for sure.
> Yes, something's missing.
> To take the matter further, what if you had katepart embedded into
> two different applications, at the same time, and changed shortcuts in
> one of them? To make both use cases work, I think what we need is
> DBUS notification. But at the same time, I am not sure we want to
> register each and every kxmlguiclient to dbus...
> Another solution would be to use KDirWatch on the file where
> the shortcuts are saved (that's a local xmlgui file, not kconfig, right?)
> The third solution is "you must restart your application for these changes
> to take effect" ;-)

I'd argue that having multiple documents with different shortcuts
working in each is a bit more problematic than two different apps that
happen to embed the same component. I think that for the
two-different-apps case its quite ok to force the user to do a restart,
but IMHO this is not acceptable for the xmlgui clients embedded into the
same app as the one that changed its shortcut.


Try to get all of your posthumous medals in advance.

More information about the kde-core-devel mailing list