Commit 6cf74d2f authored by Elvis Angelaccio's avatar Elvis Angelaccio

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.
parent d55b0875
......@@ -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());
......
......@@ -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,
......
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