mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 00:11:21 +00:00
Use the default keyboard shortcuts for next-tab/previous-tab as primary key, but use the commonly used shortcuts Ctrl+Tab/Ctrl+Shift+Tab as secondary keys.
Of course it is still possible that the user defines custom shortcuts. BUG: 231541 svn path=/trunk/KDE/kdebase/apps/; revision=1106406
This commit is contained in:
parent
cb1079331e
commit
077e5efa43
|
@ -1495,17 +1495,23 @@ void DolphinMainWindow::setupActions()
|
|||
KStandardAction::preferences(this, SLOT(editSettings()), actionCollection());
|
||||
|
||||
// not in menu actions
|
||||
QList<QKeySequence> nextTabKeys;
|
||||
nextTabKeys.append(KStandardShortcut::tabNext().primary());
|
||||
nextTabKeys.append(QKeySequence(Qt::CTRL + Qt::Key_Tab));
|
||||
|
||||
QList<QKeySequence> prevTabKeys;
|
||||
prevTabKeys.append(KStandardShortcut::tabPrev().primary());
|
||||
prevTabKeys.append(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Tab));
|
||||
|
||||
KAction* activateNextTab = actionCollection()->addAction("activate_next_tab");
|
||||
activateNextTab->setText(i18nc("@action:inmenu", "Activate Next Tab"));
|
||||
connect(activateNextTab, SIGNAL(triggered()), SLOT(activateNextTab()));
|
||||
activateNextTab->setShortcuts(QApplication::isRightToLeft() ? KStandardShortcut::tabPrev() :
|
||||
KStandardShortcut::tabNext());
|
||||
activateNextTab->setShortcuts(QApplication::isRightToLeft() ? prevTabKeys : nextTabKeys);
|
||||
|
||||
KAction* activatePrevTab = actionCollection()->addAction("activate_prev_tab");
|
||||
activatePrevTab->setText(i18nc("@action:inmenu", "Activate Previous Tab"));
|
||||
connect(activatePrevTab, SIGNAL(triggered()), SLOT(activatePrevTab()));
|
||||
activatePrevTab->setShortcuts(QApplication::isRightToLeft() ? KStandardShortcut::tabNext() :
|
||||
KStandardShortcut::tabPrev());
|
||||
activatePrevTab->setShortcuts(QApplication::isRightToLeft() ? nextTabKeys : prevTabKeys);
|
||||
|
||||
// for context menu
|
||||
KAction* openInNewTab = actionCollection()->addAction("open_in_new_tab");
|
||||
|
|
Loading…
Reference in a new issue