Bug 174541 - Global shortcuts not configurable
Summary: Global shortcuts not configurable
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-07 15:48 UTC by Xenophon
Modified: 2009-07-26 14:21 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xenophon 2008-11-07 15:48:05 UTC
Version:           3.1.2 (using 4.1.3 (KDE 4.1.3), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-7-generic

Not sure if this is a KDE or KTorrent issue. In KTorrent's Settings -> configure short-cuts window, the option to configure global short-cuts appears to be inaccessible. I can configure the default and alternate short-cut, but not the global option which does not have the greater than prefix.

Thanks.
Comment 1 Joris Guisson 2008-11-08 10:56:19 UTC
Seems to be a problem on all KDE apps, so I'm handing it over to the kdelibs people.
Comment 2 Dario Andres 2008-12-25 18:46:40 UTC
I think you can manage Global Shortcuts in Amarok. May be this is only related to some applications.

Here using:

Qt: 4.4.3
KDE: 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221))
kdelibs svn rev. 901348 / kdebase svn rev. 901348
on ArchLinux x86_64 - Kernel 2.6.27.10

I can't configure the "Global Shortcuts" when Configuring Shortcuts in KWrite (seems logical as it doesn't make sense doing something in KWrite if the windows isn't focused)
Comment 3 Claus Appel 2009-01-09 16:01:20 UTC
I can confirm this problem. Global shortcuts cannot be configured in KTorrent and Kate (and Kile doesn't even have them). Only Amarok has them working. 
Comment 4 Dario Andres 2009-01-09 16:04:13 UTC
Maybe this can be turned into a wish to not show the Global shortcuts column in the Configure Shortcut dialog when the application doesn't allow it
Comment 5 Claus Appel 2009-01-09 18:38:01 UTC
(In reply to comment #4)
> Maybe this can be turned into a wish to not show the Global shortcuts column in
> the Configure Shortcut dialog when the application doesn't allow it
> 

I disagree. KTorrent had global shortcuts in KDE 3.5. It's only in KDE 4 that they don't work. I don't know where the problem lies, but KTorrent for one needs them back. 
Comment 6 Michael Jansen 2009-02-17 23:45:15 UTC
Move to ktorrent.

Global shortcuts have to be enabled by the application. We do not allow them to be assigned to every action. An application developer has to enabled that for each action it makes sense.
Comment 7 Adeodato Simó 2009-07-24 11:07:01 UTC
(In reply to comment #6)
> Global shortcuts have to be enabled by the application. We do not allow them to
> be assigned to every action. An application developer has to enabled that for
> each action it makes sense.

That sounds sensible. What I think it's missing, and would prove useful,
is having a way for the developer to say: “Hey, I think it should be
possible to configure a shortcut for this action, but I won't be
providing a default shortcut myself.”

The idea is that the developer may not want to pollute the global
shortcut namespace, and let the user pick one only if the really want
it. At the moment, it's only possible for the user to configure global
shortcuts for an action if the developer has provided with a default
one.

Thoughts?
Comment 8 Michael Jansen 2009-07-24 11:58:23 UTC
> At the moment, it's only possible for the user to configure global
> shortcuts for an action if the developer has provided with a default
> one.

action->setGlobalShortcut(KShortcut())

That's how its done.
Comment 9 Claus Appel 2009-07-24 12:32:29 UTC
It is clear from the discussion that this is still a KTorrent bug. Can someone with the right permissions please reopen it as such?
Comment 10 Michael Jansen 2009-07-24 12:52:33 UTC
Global shortcuts are configurable. This bug IS invalid.

All that is missing is ktorrent/whatever marking some shortcuts as valid to get a global shortcut.

It looks like the ktorrent developers decided to not provide global shortcuts in their kde 4 version. You have to make your case why you need them. And which ones you need. They have to enable then.

Open a wish explaining which shortcuts you want to have accessible as global shortcuts. One per app.
Comment 11 Adeodato Simó 2009-07-24 13:03:18 UTC
> action->setGlobalShortcut(KShortcut())
> That's how its done.

Oh, please excuse my ignorance, and thanks for the hint! (It works, of
course.)
Comment 12 Joris Guisson 2009-07-24 22:11:09 UTC
Great after nearly 8 months, we have finally established, that this is actually a ktorrent bug :-)

> action->setGlobalShortcut(KShortcut())
> That's how its done.

That is only half of the story, the action apparently also needs an object name, which is not set in ktorrent, hence it is not working. Must have missed that back then, or maybe the docs didn't mention this at the time. Anyway will fix this tomorrow.
Comment 13 Joris Guisson 2009-07-25 10:01:05 UTC
SVN commit 1002150 by guisson:

Make global shortcut to show and hide ktorrent work again

BUG: 174541

 M  +2 -1      ChangeLog  
 M  +2 -1      ktorrent/gui.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1002150
Comment 14 Michael Jansen 2009-07-26 14:21:59 UTC
SVN commit 1002563 by mjansen:

Do it correctly. ActionCollection::addAction( "<id>", action ) sets the objectname.
It's not a good idea to set it to "ktorrent-show-hide-action" first and then try
to change it to "show_kt". Neither for global shortcuts not for local shortcuts.

The code will do the right thing (refusing to rename the action) but you should
get a warning now.

CCBUG: 174541

 M  +6 -10     gui.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1002563