HINT: It's not the right way to call forgetGlobalShortcut just because you want
to set a new global shortcut for a action. Have a look at the parameters of setGlobalShortcut() The method is now only called for newly created actions. No need to overwrite existing shortcuts. Step 2 will follow with next commit. svn path=/trunk/KDE/kdebase/workspace/; revision=1021773
This commit is contained in:
parent
f37efe22c9
commit
044acd9591
1 changed files with 4 additions and 12 deletions
|
@ -450,25 +450,17 @@ void KWinDesktopConfig::slotChangeShortcuts( int number )
|
|||
else
|
||||
{
|
||||
KShortcut shortcut(shortcutString);
|
||||
if (sender())
|
||||
action->forgetGlobalShortcut();
|
||||
if (KGlobalAccel::self()->isGlobalShortcutAvailable(shortcut.primary()))
|
||||
{
|
||||
action->setGlobalShortcut( shortcut );
|
||||
if (sender())
|
||||
{
|
||||
m_ui->messageLabel->setText(i18n( "Assigned global Shortcut \"%1\" to Desktop %2", shortcutString, desktop ));
|
||||
m_ui->messageLabel->show();
|
||||
}
|
||||
m_ui->messageLabel->setText(i18n( "Assigned global Shortcut \"%1\" to Desktop %2", shortcutString, desktop ));
|
||||
m_ui->messageLabel->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
action->setGlobalShortcut( KShortcut(), KAction::ActiveShortcut );
|
||||
if (sender())
|
||||
{
|
||||
m_ui->messageLabel->setText(i18n( "Shortcut conflict: Could not set Shortcut %1 for Desktop %2", shortcutString, desktop ));
|
||||
m_ui->messageLabel->show();
|
||||
}
|
||||
m_ui->messageLabel->setText(i18n( "Shortcut conflict: Could not set Shortcut %1 for Desktop %2", shortcutString, desktop ));
|
||||
m_ui->messageLabel->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue