Changeset View
Changeset View
Standalone View
Standalone View
src/SessionController.cpp
Show First 20 Lines • Show All 624 Lines • ▼ Show 20 Line(s) | 604 | #endif | |||
---|---|---|---|---|---|
625 | action->setText(i18n("Edit Current Profile...")); | 625 | action->setText(i18n("Edit Current Profile...")); | ||
626 | action->setIcon(QIcon::fromTheme(QStringLiteral("document-properties"))); | 626 | action->setIcon(QIcon::fromTheme(QStringLiteral("document-properties"))); | ||
627 | 627 | | |||
628 | _switchProfileMenu = new KActionMenu(i18n("Switch Profile"), this); | 628 | _switchProfileMenu = new KActionMenu(i18n("Switch Profile"), this); | ||
629 | collection->addAction(QStringLiteral("switch-profile"), _switchProfileMenu); | 629 | collection->addAction(QStringLiteral("switch-profile"), _switchProfileMenu); | ||
630 | 630 | | |||
631 | // History | 631 | // History | ||
632 | _findAction = KStandardAction::find(this, SLOT(searchBarEvent()), collection); | 632 | _findAction = KStandardAction::find(this, SLOT(searchBarEvent()), collection); | ||
633 | collection->setDefaultShortcut(_findAction, QKeySequence()); | | |||
634 | 633 | | |||
635 | _findNextAction = KStandardAction::findNext(this, SLOT(findNextInHistory()), collection); | 634 | _findNextAction = KStandardAction::findNext(this, SLOT(findNextInHistory()), collection); | ||
636 | collection->setDefaultShortcut(_findNextAction, QKeySequence()); | | |||
637 | _findNextAction->setEnabled(false); | 635 | _findNextAction->setEnabled(false); | ||
638 | 636 | | |||
639 | _findPreviousAction = KStandardAction::findPrev(this, SLOT(findPreviousInHistory()), collection); | 637 | _findPreviousAction = KStandardAction::findPrev(this, SLOT(findPreviousInHistory()), collection); | ||
640 | collection->setDefaultShortcut(_findPreviousAction, QKeySequence()); | | |||
641 | _findPreviousAction->setEnabled(false); | 638 | _findPreviousAction->setEnabled(false); | ||
642 | 639 | | |||
640 | #ifdef Q_OS_MACOS | ||||
641 | collection->setDefaultShortcut(_findAction, Qt::META + Qt::Key_F); | ||||
642 | collection->setDefaultShortcut(_findNextAction, Qt::META + Qt::Key_G); | ||||
643 | collection->setDefaultShortcut(_findPreviousAction, Qt::META + Qt::SHIFT + Qt::Key_G); | ||||
644 | #else | ||||
645 | collection->setDefaultShortcut(_findAction, Konsole::ACCEL + Qt::SHIFT + Qt::Key_F); | ||||
646 | collection->setDefaultShortcut(_findNextAction, Qt::Key_F3); | ||||
647 | collection->setDefaultShortcut(_findPreviousAction, Qt::SHIFT + Qt::Key_F3); | ||||
648 | #endif | ||||
649 | | ||||
643 | // Character Encoding | 650 | // Character Encoding | ||
644 | _codecAction = new KCodecAction(i18n("Set &Encoding"), this); | 651 | _codecAction = new KCodecAction(i18n("Set &Encoding"), this); | ||
645 | _codecAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set"))); | 652 | _codecAction->setIcon(QIcon::fromTheme(QStringLiteral("character-set"))); | ||
646 | collection->addAction(QStringLiteral("set-encoding"), _codecAction); | 653 | collection->addAction(QStringLiteral("set-encoding"), _codecAction); | ||
647 | connect(_codecAction->menu(), &QMenu::aboutToShow, this, &Konsole::SessionController::updateCodecAction); | 654 | connect(_codecAction->menu(), &QMenu::aboutToShow, this, &Konsole::SessionController::updateCodecAction); | ||
648 | connect(_codecAction, | 655 | connect(_codecAction, | ||
649 | QOverload<QTextCodec*>::of(&KCodecAction::triggered), this, | 656 | QOverload<QTextCodec*>::of(&KCodecAction::triggered), this, | ||
650 | &Konsole::SessionController::changeCodec); | 657 | &Konsole::SessionController::changeCodec); | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 667 | { | |||
772 | action->setText(i18n("User Signal &1") + QStringLiteral(" (USR1)")); | 779 | action->setText(i18n("User Signal &1") + QStringLiteral(" (USR1)")); | ||
773 | action->setData(SIGUSR1); | 780 | action->setData(SIGUSR1); | ||
774 | sendSignalActions->addAction(action); | 781 | sendSignalActions->addAction(action); | ||
775 | 782 | | |||
776 | action = collection->addAction(QStringLiteral("sigusr2-signal")); | 783 | action = collection->addAction(QStringLiteral("sigusr2-signal")); | ||
777 | action->setText(i18n("User Signal &2") + QStringLiteral(" (USR2)")); | 784 | action->setText(i18n("User Signal &2") + QStringLiteral(" (USR2)")); | ||
778 | action->setData(SIGUSR2); | 785 | action->setData(SIGUSR2); | ||
779 | sendSignalActions->addAction(action); | 786 | sendSignalActions->addAction(action); | ||
780 | | ||||
781 | #ifdef Q_OS_MACOS | | |||
782 | collection->setDefaultShortcut(_findAction, Qt::META + Qt::Key_F); | | |||
783 | collection->setDefaultShortcut(_findNextAction, Qt::META + Qt::Key_G); | | |||
784 | collection->setDefaultShortcut(_findPreviousAction, Qt::META + Qt::SHIFT + Qt::Key_G); | | |||
785 | #else | | |||
786 | collection->setDefaultShortcut(_findAction, Konsole::ACCEL + Qt::SHIFT + Qt::Key_F); | | |||
787 | collection->setDefaultShortcut(_findNextAction, Qt::Key_F3); | | |||
788 | collection->setDefaultShortcut(_findPreviousAction, Qt::SHIFT + Qt::Key_F3); | | |||
789 | #endif | | |||
790 | } | 787 | } | ||
791 | 788 | | |||
792 | void SessionController::switchProfile(const Profile::Ptr &profile) | 789 | void SessionController::switchProfile(const Profile::Ptr &profile) | ||
793 | { | 790 | { | ||
794 | if (isReadOnly()) { | 791 | if (isReadOnly()) { | ||
795 | return; | 792 | return; | ||
796 | } | 793 | } | ||
797 | 794 | | |||
▲ Show 20 Lines • Show All 1009 Lines • Show Last 20 Lines |