Commit 1cb25441 authored by Nate Graham's avatar Nate Graham
Browse files

Remove "Show KRunner" item from desktop context menu

In the past, this was considered to be a way to make KRunner more
discoverable by users.

However today Kickoff exposes all the same runners as KRunner, so its
full functionality is therefore more discoverable in a different way,
so making the KRunner UI itelf more discoverable is not as important.

Furthermore, this was always a questionable way to increase
discoverability in the first place, because the menu item did not expose
the keyboard shortcut, which is the typical way that people show
KRunner. Also, context menus are generally considered shortcuts for
experts; novice users don't tend to use context menus very much. But
experts are the people more likely to already know about KRunner and its
keyboard shortcut, and would never invoke it using the desktop context
menu.

Removing this menu item de-clutters the desktop context menu a bit, and
we do get complaints that the menu is overwhelming because it has too
many things in it. This is a fairly unimportant item that we can remove
without any real consequences.

Finally, Marco didn't like the change to refer to KRunner using the
actual term "KRunner" in the main UI, so this change removes one of the
two places where that happened. :)
parent 2f4b27fc
......@@ -40,7 +40,6 @@
ContextMenu::ContextMenu(QObject *parent, const QVariantList &args)
: Plasma::ContainmentActions(parent, args)
, m_runCommandAction(nullptr)
, m_lockScreenAction(nullptr)
, m_logoutAction(nullptr)
, m_separator1(nullptr)
......@@ -89,12 +88,7 @@ void ContextMenu::restore(const KConfigGroup &config)
}
// everything below should only happen once, so check for it
if (!m_runCommandAction) {
m_runCommandAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Show KRunner"), this);
m_runCommandAction->setIcon(QIcon::fromTheme(QStringLiteral("plasma-search")));
m_runCommandAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("krunner.desktop"), QStringLiteral("_launch")).value(0));
connect(m_runCommandAction, &QAction::triggered, this, &ContextMenu::runCommand);
if (!m_lockScreenAction) {
m_lockScreenAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Lock Screen"), this);
m_lockScreenAction->setIcon(QIcon::fromTheme(QStringLiteral("system-lock-screen")));
m_lockScreenAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("ksmserver"), QStringLiteral("Lock Session")).value(0));
......@@ -169,10 +163,6 @@ QAction *ContextMenu::action(const QString &name)
if (c->corona() && c->corona()->immutability() == Plasma::Types::Mutable) {
return c->corona()->actions()->action(QStringLiteral("add panel"));
}
} else if (name == QLatin1String("_run_command")) {
if (KAuthorized::authorizeAction(QStringLiteral("run_command")) && KAuthorized::authorize(QStringLiteral("run_command"))) {
return m_runCommandAction;
}
} else if (name == QLatin1String("_lock_screen")) {
if (KAuthorized::authorizeAction(QStringLiteral("lock_screen"))) {
return m_lockScreenAction;
......
......@@ -46,7 +46,6 @@ public Q_SLOTS:
void startLogout();
private:
QAction *m_runCommandAction;
QAction *m_lockScreenAction;
QAction *m_logoutAction;
QAction *m_separator1;
......
Supports Markdown
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