summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-01-21 12:15:07 +0100
committerElvis Angelaccio <[email protected]>2018-01-21 12:15:07 +0100
commit6cf74d2fdd36c5322c2db3278aea9c9d47b77889 (patch)
tree7e99be9ad722473dfb26f8a1b9c40c4cff7b3c33
parentd55b0875ffac78ba99ca63f774be17273d396137 (diff)
Don't show 'Open Terminal' on Windows
We already disable the TerminalPanel on Windows, we should do the same with the 'Open Terminal' action for consistency.
-rw-r--r--src/dolphinmainwindow.cpp2
-rw-r--r--src/dolphinpart.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 4d0e6b2..62b07f5 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1184,6 +1184,7 @@ void DolphinMainWindow::setupActions()
compareFiles->setEnabled(false);
connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles);
+#ifndef Q_OS_WIN
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal"));
openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal"));
@@ -1191,6 +1192,7 @@ void DolphinMainWindow::setupActions()
actionCollection()->setDefaultShortcut(openTerminal, Qt::SHIFT | Qt::Key_F4);
connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal);
}
+#endif
// setup 'Settings' menu
KToggleAction* showMenuBar = KStandardAction::showMenubar(nullptr, nullptr, actionCollection());
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
index c8bc8b6..6f8e204 100644
--- a/src/dolphinpart.cpp
+++ b/src/dolphinpart.cpp
@@ -223,6 +223,7 @@ void DolphinPart::createActions()
m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile);
+#ifndef Q_OS_WIN
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
m_openTerminalAction = actionCollection()->addAction(QStringLiteral("open_terminal"));
m_openTerminalAction->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
@@ -230,6 +231,7 @@ void DolphinPart::createActions()
connect(m_openTerminalAction, &QAction::triggered, this, &DolphinPart::slotOpenTerminal);
actionCollection()->setDefaultShortcut(m_openTerminalAction, Qt::Key_F4);
}
+#endif
}
void DolphinPart::createGoAction(const char* name, const char* iconName,