diff --git a/src/settings/general/behaviorsettingspage.h b/src/settings/general/behaviorsettingspage.h --- a/src/settings/general/behaviorsettingspage.h +++ b/src/settings/general/behaviorsettingspage.h @@ -56,6 +56,8 @@ QRadioButton* m_localViewProps; QRadioButton* m_globalViewProps; + QCheckBox* m_showFullPath; + QCheckBox* m_showFullPathInTitlebar; QCheckBox* m_showToolTips; QLabel* m_configureToolTips; diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -36,6 +36,8 @@ m_url(url), m_localViewProps(nullptr), m_globalViewProps(nullptr), + m_showFullPath(nullptr), + m_showFullPathInTitlebar(nullptr), m_showToolTips(nullptr), m_showSelectionToggle(nullptr), m_naturalSorting(nullptr), @@ -58,6 +60,12 @@ topLayout->addRow(i18nc("@title:group", "View: "), m_globalViewProps); topLayout->addRow(QString(), m_localViewProps); + topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT / 3, QSizePolicy::Fixed, QSizePolicy::Fixed)); + + m_showFullPath = new QCheckBox(i18nc("@option:check", "Show full path inside location bar")); + topLayout->addRow(QString(), m_showFullPath); + m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check", "Show full path in title bar")); + topLayout->addRow(QString(), m_showFullPathInTitlebar); topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); @@ -110,6 +118,8 @@ connect(m_localViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); connect(m_globalViewProps, &QRadioButton::toggled, this, &BehaviorSettingsPage::changed); + connect(m_showFullPath, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); + connect(m_showFullPathInTitlebar, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); #ifdef HAVE_BALOO connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); #endif @@ -133,6 +143,8 @@ const bool useGlobalViewProps = m_globalViewProps->isChecked(); settings->setGlobalViewProps(useGlobalViewProps); + settings->setShowFullPath(m_showFullPath->isChecked()); + settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked()); #ifdef HAVE_BALOO settings->setShowToolTips(m_showToolTips->isChecked()); #endif @@ -167,6 +179,8 @@ m_localViewProps->setChecked(!useGlobalViewProps); m_globalViewProps->setChecked(useGlobalViewProps); + m_showFullPath->setChecked(GeneralSettings::showFullPath()); + m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar()); #ifdef HAVE_BALOO m_showToolTips->setChecked(GeneralSettings::showToolTips()); #endif diff --git a/src/settings/navigation/navigationsettingspage.h b/src/settings/navigation/navigationsettingspage.h --- a/src/settings/navigation/navigationsettingspage.h +++ b/src/settings/navigation/navigationsettingspage.h @@ -46,6 +46,7 @@ private: QCheckBox* m_openArchivesAsFolder; QCheckBox* m_autoExpandFolders; + QCheckBox* m_openExternallyCalledFolderInNewTab; }; #endif diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp --- a/src/settings/navigation/navigationsettingspage.cpp +++ b/src/settings/navigation/navigationsettingspage.cpp @@ -29,7 +29,8 @@ NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) : SettingsPageBase(parent), m_openArchivesAsFolder(nullptr), - m_autoExpandFolders(nullptr) + m_autoExpandFolders(nullptr), + m_openExternallyCalledFolderInNewTab(nullptr) { QVBoxLayout* topLayout = new QVBoxLayout(this); QWidget* vBox = new QWidget(this); @@ -40,15 +41,19 @@ m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder"), vBox); vBoxLayout->addWidget(m_openArchivesAsFolder); - m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"), vBox); + m_autoExpandFolders = new QCheckBox(i18nc("@option:check", "Open folders during drag operations"), vBox); vBoxLayout->addWidget(m_autoExpandFolders); + m_openExternallyCalledFolderInNewTab = new QCheckBox(i18nc("@option:check", "Open new folders in tabs")); + vBoxLayout->addWidget(m_openExternallyCalledFolderInNewTab); + topLayout->addWidget(vBox); loadSettings(); connect(m_openArchivesAsFolder, &QCheckBox::toggled, this, &NavigationSettingsPage::changed); connect(m_autoExpandFolders, &QCheckBox::toggled, this, &NavigationSettingsPage::changed); + connect(m_openExternallyCalledFolderInNewTab, &QCheckBox::toggled, this, &NavigationSettingsPage::changed); } NavigationSettingsPage::~NavigationSettingsPage() @@ -60,6 +65,7 @@ GeneralSettings* settings = GeneralSettings::self(); settings->setBrowseThroughArchives(m_openArchivesAsFolder->isChecked()); settings->setAutoExpandFolders(m_autoExpandFolders->isChecked()); + settings->setOpenExternallyCalledFolderInNewTab(m_openExternallyCalledFolderInNewTab->isChecked()); settings->save(); } @@ -76,5 +82,6 @@ { m_openArchivesAsFolder->setChecked(GeneralSettings::browseThroughArchives()); m_autoExpandFolders->setChecked(GeneralSettings::autoExpandFolders()); + m_openExternallyCalledFolderInNewTab->setChecked(GeneralSettings::openExternallyCalledFolderInNewTab()); } diff --git a/src/settings/startup/startupsettingspage.h b/src/settings/startup/startupsettingspage.h --- a/src/settings/startup/startupsettingspage.h +++ b/src/settings/startup/startupsettingspage.h @@ -67,10 +67,7 @@ QCheckBox* m_splitView; QCheckBox* m_editableUrl; - QCheckBox* m_showFullPath; QCheckBox* m_filterBar; - QCheckBox* m_showFullPathInTitlebar; - QCheckBox* m_openExternallyCalledFolderInNewTab; }; #endif diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -47,10 +47,7 @@ m_homeUrlRadioButton(nullptr), m_splitView(nullptr), m_editableUrl(nullptr), - m_showFullPath(nullptr), - m_filterBar(nullptr), - m_showFullPathInTitlebar(nullptr), - m_openExternallyCalledFolderInNewTab(nullptr) + m_filterBar(nullptr) { QFormLayout* topLayout = new QFormLayout(this); @@ -118,13 +115,6 @@ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); - m_openExternallyCalledFolderInNewTab = new QCheckBox(i18nc("@option:check Startup Settings", "Open new folders in tabs")); - topLayout->addRow(i18nc("@label:checkbox", "General:"), m_openExternallyCalledFolderInNewTab); - m_showFullPath = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path inside location bar")); - topLayout->addRow(QString(), m_showFullPath); - m_showFullPathInTitlebar = new QCheckBox(i18nc("@option:check Startup Settings", "Show full path in title bar")); - topLayout->addRow(QString(), m_showFullPathInTitlebar); - loadSettings(); updateInitialViewOptions(); @@ -137,9 +127,6 @@ connect(m_editableUrl, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged); connect(m_filterBar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged); - connect(m_openExternallyCalledFolderInNewTab, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged); - connect(m_showFullPath, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged); - connect(m_showFullPathInTitlebar, &QCheckBox::toggled, this, &StartupSettingsPage::slotSettingsChanged); } StartupSettingsPage::~StartupSettingsPage() @@ -170,9 +157,6 @@ settings->setSplitView(m_splitView->isChecked()); settings->setEditableUrl(m_editableUrl->isChecked()); settings->setFilterBar(m_filterBar->isChecked()); - settings->setOpenExternallyCalledFolderInNewTab(m_openExternallyCalledFolderInNewTab->isChecked()); - settings->setShowFullPath(m_showFullPath->isChecked()); - settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked()); settings->save(); } @@ -230,8 +214,5 @@ m_homeUrlRadioButton->setChecked(!GeneralSettings::rememberOpenedTabs()); m_splitView->setChecked(GeneralSettings::splitView()); m_editableUrl->setChecked(GeneralSettings::editableUrl()); - m_showFullPath->setChecked(GeneralSettings::showFullPath()); m_filterBar->setChecked(GeneralSettings::filterBar()); - m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar()); - m_openExternallyCalledFolderInNewTab->setChecked(GeneralSettings::openExternallyCalledFolderInNewTab()); }