Fixing i18n + global shortcuts

Christian Esken esken at kde.org
Thu Jun 5 11:42:14 BST 2008


Am Donnerstag, 5. Juni 2008 schrieb Christian Esken:
> Am Mittwoch, 4. Juni 2008 schrieb David Faure:
> > On Saturday 31 May 2008, Christian Esken wrote:
> > > 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.
> > 
> 
> Hmm, this method is for *assigning* a global shortcut, so this would  probably activate several hundred global keyboard shortcuts - 1 or 3 for each of the controls of the soundcard(s). At least this is what I read form the KAction documentation:
> 
> "When an action, identified by main component name and objectName(), is assigned a global shortcut for the first time on a KDE installation the assignment will be saved."
> 
> So I guess this leads to saving several hundred assignments, and restoring them during the start of KDE. I can try, but it sounds pretty bad performance-wise.

I just tested it, and it is really like I feared. About 200 shortcuts are now showing up in the systemsettings keyboard shortcuts module for KMix. Makes it pretty unusable, and most likely slow. In any case a small usability issue is better than a big usability issue - with global shortcuts not working at all.

But as far as I anderstand the setGlobalShortcut() and the former setGlobalShortcutAllowed() are something completely different. The first *assigns* a shortcut, while the second *allows to assign* a shortcut (via shortcut dialog). So setGlobalShortcutAllowed() or enableGlobalShortcut() should be there in my opinion.

  Christian




-- 
Things should be made as simple as possible, but no simpler. 
  - Albert Einstein




More information about the kde-core-devel mailing list