|
|
|
@ -1,15 +1,15 @@
|
|
|
|
|
diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-in-contextmenu plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp
|
|
|
|
|
--- plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-in-contextmenu 2016-03-29 09:22:11.000000000 -0500
|
|
|
|
|
+++ plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp 2016-04-08 16:43:57.737164018 -0500
|
|
|
|
|
@@ -30,6 +30,7 @@
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
diff -up plasma-workspace-5.7.95/containmentactions/contextmenu/menu.cpp.konsole-in-contextmenu plasma-workspace-5.7.95/containmentactions/contextmenu/menu.cpp
|
|
|
|
|
--- plasma-workspace-5.7.95/containmentactions/contextmenu/menu.cpp.konsole-in-contextmenu 2016-09-15 06:25:28.000000000 -0500
|
|
|
|
|
+++ plasma-workspace-5.7.95/containmentactions/contextmenu/menu.cpp 2016-09-22 18:08:59.562282083 -0500
|
|
|
|
|
@@ -31,6 +31,7 @@
|
|
|
|
|
#include <QIcon>
|
|
|
|
|
#include <KGlobalAccel>
|
|
|
|
|
#include <KLocalizedString>
|
|
|
|
|
+#include <KToolInvocation>
|
|
|
|
|
|
|
|
|
|
#include <Plasma/Containment>
|
|
|
|
|
#include <Plasma/Corona>
|
|
|
|
|
@@ -45,6 +46,7 @@
|
|
|
|
|
@@ -46,6 +47,7 @@
|
|
|
|
|
|
|
|
|
|
ContextMenu::ContextMenu(QObject *parent, const QVariantList &args)
|
|
|
|
|
: Plasma::ContainmentActions(parent, args),
|
|
|
|
@ -17,7 +17,7 @@ diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-
|
|
|
|
|
m_runCommandAction(0),
|
|
|
|
|
m_lockScreenAction(0),
|
|
|
|
|
m_logoutAction(0),
|
|
|
|
|
@@ -74,7 +76,7 @@ void ContextMenu::restore(const KConfigG
|
|
|
|
|
@@ -75,7 +77,7 @@ void ContextMenu::restore(const KConfigG
|
|
|
|
|
m_actionOrder << QStringLiteral("add widgets") << QStringLiteral("_add panel") << QStringLiteral("lock widgets") << QStringLiteral("_context") << QStringLiteral("configure") << QStringLiteral("remove");
|
|
|
|
|
} else {
|
|
|
|
|
actions.insert(QStringLiteral("configure shortcuts"), false);
|
|
|
|
@ -26,7 +26,7 @@ diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-
|
|
|
|
|
<< QStringLiteral("manage activities") << QStringLiteral("remove") << QStringLiteral("lock widgets") << QStringLiteral("_sep1")
|
|
|
|
|
<<QStringLiteral("_lock_screen") << QStringLiteral("_logout") << QStringLiteral("_sep2") << QStringLiteral("run associated application") << QStringLiteral("configure")
|
|
|
|
|
<< QStringLiteral("configure shortcuts") << QStringLiteral("_sep3") << QStringLiteral("_wallpaper");
|
|
|
|
|
@@ -93,6 +95,10 @@ void ContextMenu::restore(const KConfigG
|
|
|
|
|
@@ -94,6 +96,10 @@ void ContextMenu::restore(const KConfigG
|
|
|
|
|
|
|
|
|
|
// everything below should only happen once, so check for it
|
|
|
|
|
if (!m_runCommandAction) {
|
|
|
|
@ -36,17 +36,17 @@ diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-
|
|
|
|
|
+
|
|
|
|
|
m_runCommandAction = new QAction(i18nc("plasma_containmentactions_contextmenu", "Run Command..."), this);
|
|
|
|
|
m_runCommandAction->setIcon(QIcon::fromTheme(QStringLiteral("system-run")));
|
|
|
|
|
setGlobalActionShortcut(m_runCommandAction, QStringLiteral("krunner"), QStringLiteral("run command"));
|
|
|
|
|
@@ -158,6 +164,8 @@ QAction *ContextMenu::action(const QStri
|
|
|
|
|
m_runCommandAction->setShortcut(KGlobalAccel::self()->globalShortcut(QStringLiteral("krunner"), QStringLiteral("run command")).value(0));
|
|
|
|
|
@@ -165,6 +171,8 @@ QAction *ContextMenu::action(const QStri
|
|
|
|
|
if (c->corona() && c->corona()->immutability() == Plasma::Types::Mutable) {
|
|
|
|
|
return c->corona()->actions()->action(QStringLiteral("add panel"));
|
|
|
|
|
}
|
|
|
|
|
+ } else if (name == QLatin1String("_run_konsole")) {
|
|
|
|
|
+ return m_runKonsoleAction;
|
|
|
|
|
} else if (name == QLatin1String("_run_command")) {
|
|
|
|
|
if (KAuthorized::authorizeKAction(QStringLiteral("run_command"))) {
|
|
|
|
|
if (KAuthorized::authorizeAction(QStringLiteral("run_command"))) {
|
|
|
|
|
return m_runCommandAction;
|
|
|
|
|
@@ -185,6 +193,11 @@ QAction *ContextMenu::action(const QStri
|
|
|
|
|
@@ -192,6 +200,11 @@ QAction *ContextMenu::action(const QStri
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -57,11 +57,11 @@ diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.cpp.konsole-
|
|
|
|
|
+
|
|
|
|
|
void ContextMenu::runCommand()
|
|
|
|
|
{
|
|
|
|
|
if (!KAuthorized::authorizeKAction(QStringLiteral("run_command"))) {
|
|
|
|
|
diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.h.konsole-in-contextmenu plasma-workspace-5.6.1/containmentactions/contextmenu/menu.h
|
|
|
|
|
--- plasma-workspace-5.6.1/containmentactions/contextmenu/menu.h.konsole-in-contextmenu 2016-03-29 09:22:11.000000000 -0500
|
|
|
|
|
+++ plasma-workspace-5.6.1/containmentactions/contextmenu/menu.h 2016-04-08 16:44:43.030386670 -0500
|
|
|
|
|
@@ -40,6 +40,7 @@ public:
|
|
|
|
|
if (!KAuthorized::authorizeAction(QStringLiteral("run_command"))) {
|
|
|
|
|
diff -up plasma-workspace-5.7.95/containmentactions/contextmenu/menu.h.konsole-in-contextmenu plasma-workspace-5.7.95/containmentactions/contextmenu/menu.h
|
|
|
|
|
--- plasma-workspace-5.7.95/containmentactions/contextmenu/menu.h.konsole-in-contextmenu 2016-09-15 06:25:28.000000000 -0500
|
|
|
|
|
+++ plasma-workspace-5.7.95/containmentactions/contextmenu/menu.h 2016-09-22 18:04:41.564858642 -0500
|
|
|
|
|
@@ -40,12 +40,14 @@ public:
|
|
|
|
|
void save(KConfigGroup &config) override;
|
|
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
@ -69,10 +69,9 @@ diff -up plasma-workspace-5.6.1/containmentactions/contextmenu/menu.h.konsole-in
|
|
|
|
|
void runCommand();
|
|
|
|
|
void lockScreen();
|
|
|
|
|
void startLogout();
|
|
|
|
|
@@ -47,6 +48,7 @@ public Q_SLOTS:
|
|
|
|
|
void logout();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void setGlobalActionShortcut(QAction * action, const QString & component, const QString & actionId);
|
|
|
|
|
+ QAction *m_runKonsoleAction;
|
|
|
|
|
QAction *m_runCommandAction;
|
|
|
|
|
QAction *m_lockScreenAction;
|