Finally fix setting the global shortcuts. That's how it is supposed

to be done.

svn path=/trunk/KDE/kdebase/workspace/; revision=1021774
remotes/origin/Plasma/5.0
Michael Jansen 17 years ago
parent 044acd9591
commit fdb11557bf
  1. 5
      kcmkwin/kwindesktop/main.cpp

@ -450,15 +450,14 @@ void KWinDesktopConfig::slotChangeShortcuts( int number )
else
{
KShortcut shortcut(shortcutString);
if (KGlobalAccel::self()->isGlobalShortcutAvailable(shortcut.primary()))
if (!shortcut.primary().isEmpty() || KGlobalAccel::self()->isGlobalShortcutAvailable(shortcut.primary()))
{
action->setGlobalShortcut( shortcut );
action->setGlobalShortcut( shortcut, KAction::ActiveShortcut, KAction::NoAutoloading );
m_ui->messageLabel->setText(i18n( "Assigned global Shortcut \"%1\" to Desktop %2", shortcutString, desktop ));
m_ui->messageLabel->show();
}
else
{
action->setGlobalShortcut( KShortcut(), KAction::ActiveShortcut );
m_ui->messageLabel->setText(i18n( "Shortcut conflict: Could not set Shortcut %1 for Desktop %2", shortcutString, desktop ));
m_ui->messageLabel->show();
}

Loading…
Cancel
Save