Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 6ba044c1 authored by Nicolas Fella's avatar Nicolas Fella Committed by Kurt Hindenburg

Define shortcuts for Find actions also for konsolepart

Summary:
The find action in Yakuake (and other konsolepart users) is missing
a shortcut. This is because the shortcut is only defined for Konsole
and not for the part.

BUG: 313841

Test Plan: Press Ctrl + Shift + F in Yakuake, search bar opens

Reviewers: #konsole, hindenburg, hein

Reviewed By: #konsole, hindenburg

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D19451
parent cb49c985
......@@ -630,16 +630,23 @@ void SessionController::setupCommonActions()
// History
_findAction = KStandardAction::find(this, SLOT(searchBarEvent()), collection);
collection->setDefaultShortcut(_findAction, QKeySequence());
_findNextAction = KStandardAction::findNext(this, SLOT(findNextInHistory()), collection);
collection->setDefaultShortcut(_findNextAction, QKeySequence());
_findNextAction->setEnabled(false);
_findPreviousAction = KStandardAction::findPrev(this, SLOT(findPreviousInHistory()), collection);
collection->setDefaultShortcut(_findPreviousAction, QKeySequence());
_findPreviousAction->setEnabled(false);
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(_findAction, Qt::META + Qt::Key_F);
collection->setDefaultShortcut(_findNextAction, Qt::META + Qt::Key_G);
collection->setDefaultShortcut(_findPreviousAction, Qt::META + Qt::SHIFT + Qt::Key_G);
#else
collection->setDefaultShortcut(_findAction, Konsole::ACCEL + Qt::SHIFT + Qt::Key_F);
collection->setDefaultShortcut(_findNextAction, Qt::Key_F3);
collection->setDefaultShortcut(_findPreviousAction, Qt::SHIFT + Qt::Key_F3);
#endif
// Character Encoding
_codecAction = new KCodecAction(i18n("Set &Encoding"), this);
_codecAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set")));
......@@ -777,16 +784,6 @@ void SessionController::setupExtraActions()
action->setText(i18n("User Signal &2") + QStringLiteral(" (USR2)"));
action->setData(SIGUSR2);
sendSignalActions->addAction(action);
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(_findAction, Qt::META + Qt::Key_F);
collection->setDefaultShortcut(_findNextAction, Qt::META + Qt::Key_G);
collection->setDefaultShortcut(_findPreviousAction, Qt::META + Qt::SHIFT + Qt::Key_G);
#else
collection->setDefaultShortcut(_findAction, Konsole::ACCEL + Qt::SHIFT + Qt::Key_F);
collection->setDefaultShortcut(_findNextAction, Qt::Key_F3);
collection->setDefaultShortcut(_findPreviousAction, Qt::SHIFT + Qt::Key_F3);
#endif
}
void SessionController::switchProfile(const Profile::Ptr &profile)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment