#include "generalviewsettingspage.h"
#include "dolphinmainwindow.h"
#include "dolphinsettings.h"
-#include "dolphin_generalsettings.h"
+#include "dolphinviewcontainer.h"
#include "viewproperties.h"
-#include <QtGui/QLabel>
-#include <QtGui/QGroupBox>
-#include <QtGui/QRadioButton>
-#include <QtGui/QSlider>
-#include <QtGui/QSpinBox>
-#include <QtGui/QBoxLayout>
+#include "dolphin_generalsettings.h"
+
+#include <QLabel>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QSlider>
+#include <QSpinBox>
+#include <QBoxLayout>
#include <kconfiggroup.h>
#include <kdialog.h>
setSpacing(spacing);
setMargin(margin);
- QGroupBox* propsBox = new QGroupBox(i18n("View Properties"), this);
+ QGroupBox* propsBox = new QGroupBox(i18nc("@title:group", "View Properties"), this);
- m_localProps = new QRadioButton(i18n("Remember view properties for each folder"), propsBox);
- m_globalProps = new QRadioButton(i18n("Use common view properties for all folders"), propsBox);
+ m_localProps = new QRadioButton(i18nc("@option:radio", "Remember view properties for each folder"), propsBox);
+ m_globalProps = new QRadioButton(i18nc("@option:radio", "Use common view properties for all folders"), propsBox);
QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);
propsBoxLayout->addWidget(m_localProps);
propsBoxLayout->addWidget(m_globalProps);
// create 'File Previews' box
- QGroupBox* previewBox = new QGroupBox(i18n("File Previews"), this);
+ QGroupBox* previewBox = new QGroupBox(i18nc("@title:group", "File Previews"), this);
- QLabel* maxFileSize = new QLabel(i18n("Maximum file size:"), previewBox);
+ QLabel* maxFileSize = new QLabel(i18nc("@label:slider", "Maximum file size:"), previewBox);
KHBox* vBox = new KHBox(previewBox);
vBox->setSpacing(spacing);
GeneralViewSettingsPage::~GeneralViewSettingsPage()
{
- GeneralSettings* settings = DolphinSettings::instance().generalSettings();
- settings->setDefaults();
-
- loadSettings();
}
void GeneralViewSettingsPage::applySettings()
{
- const KUrl& url = m_mainWindow->activeView()->url();
+ const KUrl& url = m_mainWindow->activeViewContainer()->url();
ViewProperties props(url); // read current view properties
const bool useGlobalProps = m_globalProps->isChecked();
m_maxPreviewSize->setTickPosition(QSlider::TicksBelow);
KConfigGroup globalConfig(KGlobal::config(), "PreviewSettings");
- const int maxByteSize = globalConfig.readEntry("MaximumSize", 1024 * 1024 /* 1 MB */);
+ const int maxByteSize = globalConfig.readEntry("MaximumSize", 5 * 1024 * 1024 /* 5 MB */);
int maxMByteSize = maxByteSize / (1024 * 1024);
if (maxMByteSize < 1) {
maxMByteSize = 1;