Commit f4fbec0c authored by Kurt Hindenburg's avatar Kurt Hindenburg

Fix --background-mode so the shortcut works

I disabled this in 2014 since it did not work; it works now and
changing the shortcut works as well.

BUG: 353382
parent fae70127
......@@ -45,7 +45,7 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
CoreAddons Crash GuiAddons DBusAddons
I18n IconThemes Init KIO Notifications NotifyConfig
Parts Pty Service TextWidgets WidgetsAddons
WindowSystem XmlGui DBusAddons
WindowSystem XmlGui DBusAddons GlobalAccel
)
find_package(KF5DocTools ${KF5_MIN_VERSION})
......
......@@ -29,6 +29,7 @@
// KDE
#include <KActionCollection>
#include <KGlobalAccel>
#include <KLocalizedString>
// Konsole
......@@ -556,15 +557,13 @@ void Application::startBackgroundMode(MainWindow *window)
return;
}
/* FIXME: This doesn't work ATM - leave in here so I dont' forget about it
KActionCollection* collection = window->actionCollection();
QAction * action = collection->addAction("toggle-background-window");
action->setObjectName(QLatin1String("Konsole Background Mode"));
action->setText(i18n("Toggle Background Window"));
action->setGlobalShortcut(QKeySequence(Konsole::ACCEL + Qt::SHIFT + Qt::Key_F12)));
QAction* action = collection->addAction(QStringLiteral("toggle-background-window"));
action->setObjectName(QStringLiteral("Konsole Background Mode"));
action->setText(i18nc("@item", "Toggle Background Window"));
KGlobalAccel::self()->setGlobalShortcut(action, QKeySequence(Konsole::ACCEL + Qt::SHIFT + Qt::Key_F12));
connect(action, &QAction::triggered, this, &Application::toggleBackgroundInstance);
*/
_backgroundInstance = window;
}
......
......@@ -123,6 +123,7 @@ set(konsole_LIBS
KF5::Pty
KF5::KIOWidgets
KF5::DBusAddons
KF5::GlobalAccel
)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
......
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