diff --git a/tabbox.cpp b/tabbox.cpp index 09fa95e7e2..3b1f628b69 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -1193,6 +1193,36 @@ void Workspace::slotWalkBackThroughDesktopList() } } +void Workspace::slotWalkThroughDesktopsKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughDesktops = KShortcut( seq ); + } + +void Workspace::slotWalkBackThroughDesktopsKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughDesktopsReverse = KShortcut( seq ); + } + +void Workspace::slotWalkThroughDesktopListKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughDesktopList = KShortcut( seq ); + } + +void Workspace::slotWalkBackThroughDesktopListKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughDesktopListReverse = KShortcut( seq ); + } + +void Workspace::slotWalkThroughWindowsKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughWindows = KShortcut( seq ); + } + +void Workspace::slotWalkBackThroughWindowsKeyChanged( const QKeySequence& seq ) + { + cutWalkThroughWindowsReverse = KShortcut( seq ); + } + void Workspace::modalActionsSwitch( bool enabled ) { QList collections; diff --git a/useractions.cpp b/useractions.cpp index ad1ee7b4a9..50994efd83 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -345,27 +345,45 @@ void Workspace::readShortcuts() KAction *kaction = qobject_cast( keys->action("Walk Through Desktops") ); if ( kaction!=0 ) + { cutWalkThroughDesktops = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkThroughDesktopsKeyChanged(QKeySequence))); + } kaction = qobject_cast( keys->action("Walk Through Desktops (Reverse)") ); if ( kaction!=0 ) + { cutWalkThroughDesktopsReverse = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkBackThroughDesktopsKeyChanged(QKeySequence))); + } kaction = qobject_cast( keys->action("Walk Through Desktop List") ); if ( kaction!=0 ) + { cutWalkThroughDesktopList = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkThroughDesktopListKeyChanged(QKeySequence))); + } kaction = qobject_cast( keys->action("Walk Through Desktop List (Reverse)") ); if ( kaction!=0 ) + { cutWalkThroughDesktopListReverse = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkBackThroughDesktopListKeyChanged(QKeySequence))); + } kaction = qobject_cast( keys->action("Walk Through Windows") ); if ( kaction!=0 ) + { cutWalkThroughWindows = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkThroughWindowsKeyChanged(QKeySequence))); + } kaction = qobject_cast( keys->action("Walk Through Windows (Reverse)") ); if ( kaction!=0 ) + { cutWalkThroughWindowsReverse = kaction->globalShortcut(); + connect( kaction, SIGNAL(globalShortcutChanged(QKeySequence)), this, SLOT(slotWalkBackThroughWindowsKeyChanged(QKeySequence))); + } discardPopup(); // so that it's recreated next time } diff --git a/workspace.h b/workspace.h index d6e01b3d53..b39b933a04 100644 --- a/workspace.h +++ b/workspace.h @@ -577,6 +577,13 @@ class Workspace : public QObject, public KDecorationDefines void slotWalkThroughWindows(); void slotWalkBackThroughWindows(); + void slotWalkThroughDesktopsKeyChanged( const QKeySequence& seq ); + void slotWalkBackThroughDesktopsKeyChanged( const QKeySequence& seq ); + void slotWalkThroughDesktopListKeyChanged( const QKeySequence& seq ); + void slotWalkBackThroughDesktopListKeyChanged( const QKeySequence& seq ); + void slotWalkThroughWindowsKeyChanged( const QKeySequence& seq ); + void slotWalkBackThroughWindowsKeyChanged( const QKeySequence& seq ); + void slotWindowOperations(); void slotWindowClose(); void slotWindowMove();