When removing a desktop set the associated actions global shortcut to empty.

svn path=/trunk/KDE/kdebase/workspace/; revision=1021775
icc-effect-5.14.5
Michael Jansen 2009-09-10 00:24:45 +00:00
parent fdb11557bf
commit 09f7f97831
1 changed files with 11 additions and 2 deletions

View File

@ -429,9 +429,18 @@ void KWinDesktopConfig::slotChangeShortcuts( int number )
{
if( number < m_actionCollection->count() )
{
// remove last actions
m_actionCollection->removeAction( m_actionCollection->actions().last() );
// Remove the action from the action collection. The action itself
// will still exist because that's the way kwin currently works.
// No need to remove/forget it. See kwinbindings.
KAction *a = qobject_cast<KAction*>(
m_actionCollection->takeAction( m_actionCollection->actions().last() ));
// Remove any associated global shortcut. Set it to ""
a->setGlobalShortcut(
KShortcut(),
KAction::ActiveShortcut,
KAction::NoAutoloading);
m_ui->messageLabel->hide();
delete a;
}
else
{