Finding shortcut
Michael Jansen
kde at michael-jansen.biz
Tue Feb 2 20:54:31 GMT 2010
On Monday 01 February 2010 03:38:08 John Tapsell wrote:
> In System Activity (aka ksysguard) you can select a process and press
> the "Kill" button to kill that process.
> I would like the tooltip to say "You can target a window to kill at
> any time by pressing ctrl+alt+esc".
Ok. Adding a method to KGlobalAccel would make it possible to do what you want. But with a major
problem. You use the method by using internal and private kwin information. Internal Information
like the component name and the actions objectname. Those become more or less part the public api of
kwin.
Currently kwin can decide to change one or the other and only has to worry about kglobalaccel and
remove the old registrations. If we add such a function this is no longer true.
Example given: One of these days i would like to move the "block global shortcuts" action from kwin
to kglobalaccel. Your app would silently stop to work if that was the shortcut you look for.
This would break applications using that method silently. No error. You just get back an empty
shortcut because the method cannot assume not finding the asked for shortcut is an error.
That's why i'm kind of cautios with adding such a method to our public api.
If both parts of code are more or less considered part of the same program i would propose the
kaction hack. But i guess ksysguard and kwin cannot be considered the same app or evgen tightly
coupled.
If we would talk about an class and someone wanted to have access to an internal kaction i would say
provide an api to get it. The equivalent here would be to add such an api to kwin (probably over
dbus). Which sounds equally dumb and not really right but if you ask me the most correct solution.
You want access to an kwin internal. And kwin will know you do.
But i won't reserve the right to decide here. So everyone with an opinion should chip in. I guess
the problem will come up from time to time so we should
We could say changing the component name is higly unlikely. With the exception of plasma it never
happened as far as i know. Changing the objectname of a global shortcut is equally unlikely but not
unseen.
So the question is. Which bad do we chose?
Mike
More information about the kde-core-devel
mailing list