mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
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.
This commit is contained in:
parent
d55b0875ff
commit
6cf74d2fdd
|
@ -1184,6 +1184,7 @@ void DolphinMainWindow::setupActions()
|
||||||
compareFiles->setEnabled(false);
|
compareFiles->setEnabled(false);
|
||||||
connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles);
|
connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles);
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
|
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
|
||||||
QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal"));
|
QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal"));
|
||||||
openTerminal->setText(i18nc("@action:inmenu Tools", "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);
|
actionCollection()->setDefaultShortcut(openTerminal, Qt::SHIFT | Qt::Key_F4);
|
||||||
connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal);
|
connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// setup 'Settings' menu
|
// setup 'Settings' menu
|
||||||
KToggleAction* showMenuBar = KStandardAction::showMenubar(nullptr, nullptr, actionCollection());
|
KToggleAction* showMenuBar = KStandardAction::showMenubar(nullptr, nullptr, actionCollection());
|
||||||
|
|
|
@ -223,6 +223,7 @@ void DolphinPart::createActions()
|
||||||
m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
|
m_findFileAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-find")));
|
||||||
connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile);
|
connect(m_findFileAction, &QAction::triggered, this, &DolphinPart::slotFindFile);
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN
|
||||||
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
|
if (KAuthorized::authorize(QStringLiteral("shell_access"))) {
|
||||||
m_openTerminalAction = actionCollection()->addAction(QStringLiteral("open_terminal"));
|
m_openTerminalAction = actionCollection()->addAction(QStringLiteral("open_terminal"));
|
||||||
m_openTerminalAction->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
|
m_openTerminalAction->setIcon(QIcon::fromTheme(QStringLiteral("utilities-terminal")));
|
||||||
|
@ -230,6 +231,7 @@ void DolphinPart::createActions()
|
||||||
connect(m_openTerminalAction, &QAction::triggered, this, &DolphinPart::slotOpenTerminal);
|
connect(m_openTerminalAction, &QAction::triggered, this, &DolphinPart::slotOpenTerminal);
|
||||||
actionCollection()->setDefaultShortcut(m_openTerminalAction, Qt::Key_F4);
|
actionCollection()->setDefaultShortcut(m_openTerminalAction, Qt::Key_F4);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinPart::createGoAction(const char* name, const char* iconName,
|
void DolphinPart::createGoAction(const char* name, const char* iconName,
|
||||||
|
|
Loading…
Reference in a new issue