Fixing i18n + global shortcuts

David Faure faure at
Wed Jun 4 09:25:48 BST 2008

On Saturday 31 May 2008, Christian Esken wrote:
> Am Montag, 3. März 2008 schrieb Andreas Hartmetz:
> > Hi all!
> > 
> > I've been hacking on this on and off for some time and it's quite close to 
> > ready so I want to make it known to avoid having to repeat answers to 
> > questions on IRC.
> > This is also a request for comments but I don't expect many if at all :)
> > The idea is that actions with global shortcuts will internally have "friendly" 
> > names which might [should] be translated and unique names like those used in 
> > KActionCollection::addAction(). The objectName() will be used for that 
> > purpose, similar to KActionCollection().
> > Other notable changes are:
> > -KAction::globalShortcutAllowed() will be deprecated and replaced with 
> > globalShortcutEnabled() according to the patch.
> > -somewhat better documentation
> > -default shortcuts will be saved too to facilitate the work of the global 
> > shortcuts KCM (there is and should be no other user I know of).
> > -for the time being, there will be no way to "forget" an action. I would like 
> > to add explicit API to do this instead of doing it using magic parameter 
> > values [i.e. KShortcut(), NoAutoloading] to KAction::setGlobalShortcut().
> > 
> > There is still room for improvement but overall the new code should be better 
> > than the old already. Please see the attachment for the largish patch.
> So what is going on now? As far as I see global shortcuts are now completely broken.
> - If I use "setGlobalShortcutAllowed(true)", I receive a "deprecated" warning, and global shortcuts aren't activated any more.
> - If I use "enableGlobalShortcut()", I receive an error (‘class KAction’ has no member named ‘enableGlobalShortcut').

As far as I can see from the code, setGlobalShortcut() should be enough to activate it.

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the kde-core-devel mailing list