#include <dolphinapplication.h>
#include <dolphinmainwindow.h>
-#include "generalsettingspage.h"
-#include "navigationsettingspage.h"
-#include "servicessettingspage.h"
-#include "startupsettingspage.h"
-#include "viewsettingspage.h"
+#include "general/generalsettingspage.h"
+#include "navigation/navigationsettingspage.h"
+#include "services/servicessettingspage.h"
+#include "startup/startupsettingspage.h"
+#include "viewmodes/viewsettingspage.h"
+#include "trash/trashsettingspage.h"
#include <klocale.h>
#include <kmessagebox.h>
servicesSettingsFrame->setIcon(KIcon("services"));
connect(servicesSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
+ // Trash
+ TrashSettingsPage* trashSettingsPage = new TrashSettingsPage(this);
+ KPageWidgetItem* trashSettingsFrame = addPage(trashSettingsPage,
+ i18nc("@title:group", "Trash"));
+ trashSettingsFrame->setIcon(KIcon("user-trash"));
+ connect(trashSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
+
// General
GeneralSettingsPage* generalSettingsPage = new GeneralSettingsPage(url, this);
KPageWidgetItem* generalSettingsFrame = addPage(generalSettingsPage,
m_pages.append(viewSettingsPage);
m_pages.append(navigationSettingsPage);
m_pages.append(servicesSettingsPage);
+ m_pages.append(trashSettingsPage);
m_pages.append(generalSettingsPage);
}
if ((button == Ok) || (button == Apply)) {
applySettings();
} else if (button == Default) {
- const QString text(i18nc("@info", "All settings will be reset to default values. Do you want to continue?"));
- if (KMessageBox::questionYesNo(this, text) == KMessageBox::Yes) {
- restoreDefaults();
- }
+ restoreDefaults();
}
KPageDialog::slotButtonClicked(button);
page->applySettings();
}
DolphinApplication::app()->refreshMainWindows();
+ enableButtonApply(false);
}
void DolphinSettingsDialog::restoreDefaults()
foreach (SettingsPageBase* page, m_pages) {
page->restoreDefaults();
}
- DolphinApplication::app()->refreshMainWindows();
}
#include "dolphinsettingsdialog.moc"