X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a3b4d94f6ee6ff3885cf197f7308bc070744964a..148282e2d856b47ceb191eeef4c834118c8cdffd:/src/generalsettingspage.cpp diff --git a/src/generalsettingspage.cpp b/src/generalsettingspage.cpp index c4b479f66..a6775df19 100644 --- a/src/generalsettingspage.cpp +++ b/src/generalsettingspage.cpp @@ -39,8 +39,11 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa m_confirmDelete(0), m_showDeleteCommand(0), m_showCopyMoveMenu(0), + m_showZoomSlider(0), + m_showSpaceInfo(0), m_browseThroughArchives(0), - m_renameInline(0) + m_renameInline(0), + m_autoExpandFolders(0) { Q_UNUSED(mainWin); @@ -75,12 +78,27 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa QVBoxLayout* contextMenuBoxLayout = new QVBoxLayout(contextMenuBox); contextMenuBoxLayout->addWidget(m_showDeleteCommand); contextMenuBoxLayout->addWidget(m_showCopyMoveMenu); + + QGroupBox* statusBarBox = new QGroupBox(i18nc("@title:group", "Status Bar"), vBox); + + m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), statusBarBox); + connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + + m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), statusBarBox); + connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + + QVBoxLayout* statusBarBoxLayout = new QVBoxLayout(statusBarBox); + statusBarBoxLayout->addWidget(m_showZoomSlider); + statusBarBoxLayout->addWidget(m_showSpaceInfo); m_browseThroughArchives = new QCheckBox(i18nc("@option:check", "Browse through archives"), vBox); connect(m_browseThroughArchives, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), vBox); connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + + m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"), vBox); + connect(m_autoExpandFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed())); // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout @@ -107,13 +125,16 @@ void GeneralSettingsPage::applySettings() confirmationGroup.sync(); KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals); - KConfigGroup globalGroup(globalConfig, "KDE"); - globalGroup.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked()); - globalGroup.sync(); + KConfigGroup configGroup(globalConfig, "KDE"); + configGroup.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked()); + configGroup.sync(); settings->setShowCopyMoveMenu(m_showCopyMoveMenu->isChecked()); + settings->setShowZoomSlider(m_showZoomSlider->isChecked()); + settings->setShowSpaceInfo(m_showSpaceInfo->isChecked()); settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked()); settings->setRenameInline(m_renameInline->isChecked()); + settings->setAutoExpandFolders(m_autoExpandFolders->isChecked()); } void GeneralSettingsPage::restoreDefaults() @@ -133,14 +154,17 @@ void GeneralSettingsPage::loadSettings() m_confirmMoveToTrash->setChecked(confirmationGroup.readEntry("ConfirmTrash", false)); m_confirmDelete->setChecked(confirmationGroup.readEntry("ConfirmDelete", true)); - KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals); - KConfigGroup globalGroup(globalConfig, "KDE"); - m_showDeleteCommand->setChecked(globalGroup.readEntry("ShowDeleteCommand", false)); - + KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::IncludeGlobals); + KConfigGroup configGroup(globalConfig, "KDE"); + m_showDeleteCommand->setChecked(configGroup.readEntry("ShowDeleteCommand", false)); + GeneralSettings* settings = DolphinSettings::instance().generalSettings(); m_showCopyMoveMenu->setChecked(settings->showCopyMoveMenu()); + m_showZoomSlider->setChecked(settings->showZoomSlider()); + m_showSpaceInfo->setChecked(settings->showSpaceInfo()); m_browseThroughArchives->setChecked(settings->browseThroughArchives()); m_renameInline->setChecked(settings->renameInline()); + m_autoExpandFolders->setChecked(settings->autoExpandFolders()); } #include "generalsettingspage.moc"