Finally fix setting the global shortcuts. That's how it is supposed
to be done. svn path=/trunk/KDE/kdebase/workspace/; revision=1021774
This commit is contained in:
parent
044acd9591
commit
fdb11557bf
1 changed files with 2 additions and 3 deletions
|
@ -450,15 +450,14 @@ void KWinDesktopConfig::slotChangeShortcuts( int number )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KShortcut shortcut(shortcutString);
|
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->setText(i18n( "Assigned global Shortcut \"%1\" to Desktop %2", shortcutString, desktop ));
|
||||||
m_ui->messageLabel->show();
|
m_ui->messageLabel->show();
|
||||||
}
|
}
|
||||||
else
|
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->setText(i18n( "Shortcut conflict: Could not set Shortcut %1 for Desktop %2", shortcutString, desktop ));
|
||||||
m_ui->messageLabel->show();
|
m_ui->messageLabel->show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue