Global shortcuts are saved with their text-name and not their action-name - Bug?

Christian Esken esken at kde.org
Sun Dec 30 12:45:18 GMT 2007


Hello,

global shortcuts are saved with their text set with action->setText(), instead of their action name. This is reflected in ~/.kde/share/config/kglobalshortcutsrc [1]. As far as I understand it, this as a bug. Am I right here?

This has an impact especially on KMix. For example the "increase volume"action can be applied to arbitrary controls (e.g. CD, PCM, Master), so the actions need to have distinct names (using a prefix in the style of "controlID at soundcardID"):

   QString increaseVolumeString = QString("Increase volume %1").arg( actionSuffix );  // e.g. actionSuffic == "PCM:0 at ALSA::USB_Audio:1"
   KAction *a = _mdwPopupActions->addAction( increaseVolumeString );
   a->setText( i18n( "Increase Volume" ) );

I cam across this when trying to understand why setting global shortcuts in KMix behaves so strange and unreliable. Obviously I don't want to present the user a label like "Increase volume PCM:0 at ALSA::USB_Audio:1". Any ideas here?

  Christian



[1] ~/.kde/share/config/kglobalshortcutsrc

Current state (wrong?):
[KDE Global Shortcuts]
kmix\x01Increase Volume=Ctrl+Shift+I

It should be instead (e.g.):
[KDE Global Shortcuts]
kmix\x01Increase Volume PCM:0 at ALSA::USB_Audio:1=Ctrl+Shift+I




More information about the kde-core-devel mailing list