X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2100a7a5c85931d46b72d391faa3d136d4401010..c72fdaa77380ef811dfef626a4edadbb824ed252:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ea19468f9..3e4a60571 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -21,6 +21,7 @@ #include "dolphinmainwindow.h" +#include "config-terminal.h" #include "global.h" #include "dolphindockwidget.h" #include "dolphincontextmenu.h" @@ -327,7 +328,7 @@ void DolphinMainWindow::openInNewTab() foreach (const KFileItem& item, list) { const QUrl& url = DolphinView::openItemAsFolderUrl(item); if (!url.isEmpty()) { - openNewTab(url); + m_tabWidget->openNewTab(url, QUrl(), DolphinTabWidget::AfterCurrentTab); tabCreated = true; } } @@ -335,7 +336,7 @@ void DolphinMainWindow::openInNewTab() // if no new tab has been created from the selection // open the current directory in a new tab if (!tabCreated) { - openNewTab(m_activeViewContainer->url()); + m_tabWidget->openNewTab(m_activeViewContainer->url(), QUrl(), DolphinTabWidget::AfterCurrentTab); } } @@ -1213,7 +1214,7 @@ void DolphinMainWindow::setupActions() compareFiles->setEnabled(false); connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles); -#ifndef Q_OS_WIN +#ifdef HAVE_TERMINAL if (KAuthorized::authorize(QStringLiteral("shell_access"))) { QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal")); openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal")); @@ -1332,7 +1333,7 @@ void DolphinMainWindow::setupDockWidgets() this, &DolphinMainWindow::showErrorMessage); // Setup "Terminal" -#ifndef Q_OS_WIN +#ifdef HAVE_TERMINAL if (KAuthorized::authorize(QStringLiteral("shell_access"))) { DolphinDockWidget* terminalDock = new DolphinDockWidget(i18nc("@title:window Shell terminal", "Terminal")); terminalDock->setLocked(lock); @@ -1605,7 +1606,7 @@ void DolphinMainWindow::updateSplitAction() QAction* splitAction = actionCollection()->action(QStringLiteral("split_view")); const DolphinTabPage* tabPage = m_tabWidget->currentTabPage(); if (tabPage->splitViewEnabled()) { - if (tabPage->primaryViewActive()) { + if (GeneralSettings::closeActiveSplitView() ? tabPage->primaryViewActive() : !tabPage->primaryViewActive()) { splitAction->setText(i18nc("@action:intoolbar Close left view", "Close")); splitAction->setToolTip(i18nc("@info", "Close left view")); splitAction->setIcon(QIcon::fromTheme(QStringLiteral("view-left-close")));