┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/navigation
diff options
context:
space:
mode:
authorDimosthenis Krallis <[email protected]>2023-08-18 07:07:48 +0000
committerMéven Car <[email protected]>2023-08-18 07:07:48 +0000
commit489b56b68bb29e81337e115c490eea4403001b71 (patch)
tree4d88f18b937387cb2b8b025f1bdf7efde12f7c4f /src/settings/navigation
parentf413e83a2266db274409dfc01bf157b74eea922a (diff)
Dolphin settings revamp
It includes a move of the settings in the Navigation and Startup sections to the Interface (formerly Behavior) section. It also includes a new tab in the View (formerly View Mode) section, called General where some settings regarding Display style, Browsing and Miscellaneous settings The Interface section has new tabs named Folders & Tabs and Status & Location bars respectively where most of the Startup and Navigation settings moved. The `dolphin/kcms/kcm_dolphinnavigation` kcm is removed.
Diffstat (limited to 'src/settings/navigation')
-rw-r--r--src/settings/navigation/navigationsettingspage.cpp82
-rw-r--r--src/settings/navigation/navigationsettingspage.h41
2 files changed, 0 insertions, 123 deletions
diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp
deleted file mode 100644
index 3b38e52e7..000000000
--- a/src/settings/navigation/navigationsettingspage.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-
-#include "navigationsettingspage.h"
-
-#include "dolphin_generalsettings.h"
-#include "global.h"
-
-#include <KLocalizedString>
-
-#include <QButtonGroup>
-#include <QCheckBox>
-#include <QFormLayout>
-#include <QRadioButton>
-
-NavigationSettingsPage::NavigationSettingsPage(QWidget *parent)
- : SettingsPageBase(parent)
- , m_openArchivesAsFolder(nullptr)
- , m_autoExpandFolders(nullptr)
- , m_openNewTabAfterLastTab(nullptr)
- , m_openNewTabAfterCurrentTab(nullptr)
-{
- QFormLayout *topLayout = new QFormLayout(this);
-
- // Tabs properties
- m_openNewTabAfterCurrentTab = new QRadioButton(i18nc("option:radio", "After current tab"));
- m_openNewTabAfterLastTab = new QRadioButton(i18nc("option:radio", "At end of tab bar"));
- QButtonGroup *tabsBehaviorGroup = new QButtonGroup(this);
- tabsBehaviorGroup->addButton(m_openNewTabAfterCurrentTab);
- tabsBehaviorGroup->addButton(m_openNewTabAfterLastTab);
- topLayout->addRow(i18nc("@title:group", "Open new tabs: "), m_openNewTabAfterCurrentTab);
- topLayout->addRow(QString(), m_openNewTabAfterLastTab);
-
- topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
-
- m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder"));
- m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"));
- topLayout->addRow(i18nc("@title:group", "General: "), m_openArchivesAsFolder);
- topLayout->addRow(QString(), m_autoExpandFolders);
-
- loadSettings();
-
- connect(m_openArchivesAsFolder, &QCheckBox::toggled, this, &NavigationSettingsPage::changed);
- connect(m_autoExpandFolders, &QCheckBox::toggled, this, &NavigationSettingsPage::changed);
- connect(m_openNewTabAfterCurrentTab, &QRadioButton::toggled, this, &NavigationSettingsPage::changed);
- connect(m_openNewTabAfterLastTab, &QRadioButton::toggled, this, &NavigationSettingsPage::changed);
-}
-
-NavigationSettingsPage::~NavigationSettingsPage()
-{
-}
-
-void NavigationSettingsPage::applySettings()
-{
- GeneralSettings *settings = GeneralSettings::self();
- settings->setBrowseThroughArchives(m_openArchivesAsFolder->isChecked());
- settings->setAutoExpandFolders(m_autoExpandFolders->isChecked());
- settings->setOpenNewTabAfterLastTab(m_openNewTabAfterLastTab->isChecked());
-
- settings->save();
-}
-
-void NavigationSettingsPage::restoreDefaults()
-{
- GeneralSettings *settings = GeneralSettings::self();
- settings->useDefaults(true);
- loadSettings();
- settings->useDefaults(false);
-}
-
-void NavigationSettingsPage::loadSettings()
-{
- m_openArchivesAsFolder->setChecked(GeneralSettings::browseThroughArchives());
- m_autoExpandFolders->setChecked(GeneralSettings::autoExpandFolders());
- m_openNewTabAfterLastTab->setChecked(GeneralSettings::openNewTabAfterLastTab());
- m_openNewTabAfterCurrentTab->setChecked(!m_openNewTabAfterLastTab->isChecked());
-}
-
-#include "moc_navigationsettingspage.cpp"
diff --git a/src/settings/navigation/navigationsettingspage.h b/src/settings/navigation/navigationsettingspage.h
deleted file mode 100644
index e0f92884f..000000000
--- a/src/settings/navigation/navigationsettingspage.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]>
- *
- * SPDX-License-Identifier: GPL-2.0-or-later
- */
-#ifndef NAVIGATIONSETTINGSPAGE_H
-#define NAVIGATIONSETTINGSPAGE_H
-
-#include "settings/settingspagebase.h"
-
-class QCheckBox;
-class QRadioButton;
-
-/**
- * @brief Page for the 'Navigation' settings of the Dolphin settings dialog.
- */
-class NavigationSettingsPage : public SettingsPageBase
-{
- Q_OBJECT
-
-public:
- explicit NavigationSettingsPage(QWidget *parent);
- ~NavigationSettingsPage() override;
-
- /** @see SettingsPageBase::applySettings() */
- void applySettings() override;
-
- /** @see SettingsPageBase::restoreDefaults() */
- void restoreDefaults() override;
-
-private:
- void loadSettings();
-
-private:
- QCheckBox *m_openArchivesAsFolder;
- QCheckBox *m_autoExpandFolders;
- QRadioButton *m_openNewTabAfterLastTab;
- QRadioButton *m_openNewTabAfterCurrentTab;
-};
-
-#endif