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,9 @@ QRadioButton* m_localViewProps; QRadioButton* m_globalViewProps; + QCheckBox* m_showFullPath; + QCheckBox* m_showFullPathInTitlebar; + QCheckBox* m_openExternallyCalledFolderInNewTab; 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,9 @@ m_url(url), m_localViewProps(nullptr), m_globalViewProps(nullptr), + m_showFullPath(nullptr), + m_showFullPathInTitlebar(nullptr), + m_openExternallyCalledFolderInNewTab(nullptr), m_showToolTips(nullptr), m_showSelectionToggle(nullptr), m_naturalSorting(nullptr), @@ -58,6 +61,15 @@ topLayout->addRow(i18nc("@title:group", "View: "), m_globalViewProps); topLayout->addRow(QString(), m_localViewProps); + topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); + + 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); + + m_openExternallyCalledFolderInNewTab = new QCheckBox(i18nc("@option:check Startup Settings", "Open new folders in tabs")); + topLayout->addRow(QString(), m_openExternallyCalledFolderInNewTab); topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); @@ -110,6 +122,9 @@ 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); + connect(m_openExternallyCalledFolderInNewTab, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); #ifdef HAVE_BALOO connect(m_showToolTips, &QCheckBox::toggled, this, &BehaviorSettingsPage::changed); #endif @@ -133,6 +148,9 @@ const bool useGlobalViewProps = m_globalViewProps->isChecked(); settings->setGlobalViewProps(useGlobalViewProps); + settings->setShowFullPath(m_showFullPath->isChecked()); + settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked()); + settings->setOpenExternallyCalledFolderInNewTab(m_openExternallyCalledFolderInNewTab->isChecked()); #ifdef HAVE_BALOO settings->setShowToolTips(m_showToolTips->isChecked()); #endif @@ -167,6 +185,9 @@ m_localViewProps->setChecked(!useGlobalViewProps); m_globalViewProps->setChecked(useGlobalViewProps); + m_showFullPath->setChecked(GeneralSettings::showFullPath()); + m_showFullPathInTitlebar->setChecked(GeneralSettings::showFullPathInTitlebar()); + m_openExternallyCalledFolderInNewTab->setChecked(GeneralSettings::openExternallyCalledFolderInNewTab()); #ifdef HAVE_BALOO m_showToolTips->setChecked(GeneralSettings::showToolTips()); #endif 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()); }