X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/95042476f62370fc3dde8f53869da23ebe8d079d..8ba61eb0c77221f94b42f2f6a532e70da3d27ccb:/src/generalsettingspage.cpp diff --git a/src/generalsettingspage.cpp b/src/generalsettingspage.cpp index 4aa762b88..ac24f2a57 100644 --- a/src/generalsettingspage.cpp +++ b/src/generalsettingspage.cpp @@ -48,7 +48,8 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa m_filterBar(0), m_showDeleteCommand(0), m_confirmMoveToTrash(0), - m_confirmDelete(0) + m_confirmDelete(0), + m_browseThroughArchives(0) { const int spacing = KDialog::spacingHint(); @@ -109,6 +110,8 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa // create 'Show the command 'Delete' in context menu' checkbox m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command in context menu"), vBox); + m_browseThroughArchives = new QCheckBox(i18nc("option:check", "Browse through archives"), vBox); + // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout // is not stretched vertically. @@ -137,16 +140,17 @@ void GeneralSettingsPage::applySettings() settings->setEditableUrl(m_editableUrl->isChecked()); settings->setFilterBar(m_filterBar->isChecked()); - KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals"); - - KConfigGroup trashConfig(globalConfig, "Trash"); + KSharedConfig::Ptr konqConfig = KSharedConfig::openConfig("konquerorrc", KConfig::IncludeGlobals); + KConfigGroup trashConfig(konqConfig, "Trash"); trashConfig.writeEntry("ConfirmTrash", m_confirmMoveToTrash->isChecked()); trashConfig.writeEntry("ConfirmDelete", m_confirmDelete->isChecked()); trashConfig.sync(); - KConfigGroup kdeConfig(globalConfig, "KDE"); + KConfigGroup kdeConfig(KGlobal::config(), "KDE"); kdeConfig.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked()); kdeConfig.sync(); + + settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked()); } void GeneralSettingsPage::restoreDefaults() @@ -155,9 +159,6 @@ void GeneralSettingsPage::restoreDefaults() settings->setDefaults(); // TODO: reset default settings for trash and show delete command... - //KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals"); - //KConfigGroup trashConfig(konqConfig, "Trash"); - //KConfigGroup kdeConfig(globalConfig, "KDE"); loadSettings(); } @@ -190,14 +191,15 @@ void GeneralSettingsPage::loadSettings() m_editableUrl->setChecked(settings->editableUrl()); m_filterBar->setChecked(settings->filterBar()); - const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals"); - - const KConfigGroup trashConfig(globalConfig, "Trash"); + KSharedConfig::Ptr konqConfig = KSharedConfig::openConfig("konquerorrc", KConfig::IncludeGlobals); + const KConfigGroup trashConfig(konqConfig, "Trash"); m_confirmMoveToTrash->setChecked(trashConfig.readEntry("ConfirmTrash", false)); m_confirmDelete->setChecked(trashConfig.readEntry("ConfirmDelete", true)); - const KConfigGroup kdeConfig(globalConfig, "KDE"); + const KConfigGroup kdeConfig(KGlobal::config(), "KDE"); m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false)); + + m_browseThroughArchives->setChecked(settings->browseThroughArchives()); } #include "generalsettingspage.moc"