From ad73de758fc1b2c5a48004adfb06559732cc305e Mon Sep 17 00:00:00 2001 From: Egor Maksimov Date: Wed, 28 Jan 2026 09:16:35 +0000 Subject: panel/terminal: Add ability to disable konsole url sync Sometimes when you work on the project using the build in konsole, most commands are meant to be run at the project root. This allows for user to disable URL sync so that one could browse the project tree without constantly needing go back to the root folder just to run a command. BUG: 306381 --- src/dolphinmainwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 2ad1cc8e3..62ff2fa45 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -2498,6 +2498,17 @@ void DolphinMainWindow::setupDockWidgets() focusTerminalPanel->setIcon(QIcon::fromTheme(QStringLiteral("swap-panels"))); actionCollection()->setDefaultShortcut(focusTerminalPanel, Qt::CTRL | Qt::SHIFT | Qt::Key_F4); connect(focusTerminalPanel, &QAction::triggered, this, &DolphinMainWindow::toggleTerminalPanelFocus); + + QAction *switchTerminalUrlSync = actionCollection()->addAction(QStringLiteral("switch_terminal_url_sync")); + switchTerminalUrlSync->setText(i18nc("@action:inmenu", "Follow Directory Switch")); + switchTerminalUrlSync->setToolTip( + i18nc("@info:tooltip", "Determines if current working directory must be kept in sync with terminal whenever directory is changed.")); + switchTerminalUrlSync->setCheckable(true); + connect(switchTerminalUrlSync, &QAction::toggled, m_terminalPanel, &TerminalPanel::switchSync); + switchTerminalUrlSync->setChecked(true); + + m_terminalPanel->setSwitchTerminalUrlSyncAction(switchTerminalUrlSync); + } // endif "shell_access" allowed #endif // HAVE_TERMINAL -- cgit v1.3