m_globalProps(0),
m_maxPreviewSize(0),
m_spinBox(0),
- m_useFileThumbnails(0)
+ m_useFileThumbnails(0),
+ m_showSelectionToggle(0)
{
const int spacing = KDialog::spacingHint();
const int margin = KDialog::marginHint();
previewBoxLayout->addWidget(vBox);
previewBoxLayout->addWidget(m_useFileThumbnails);
+ m_showSelectionToggle = new QCheckBox(i18nc("option:check", "Show selection toggle"), this);
+
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
// is not stretched vertically.
m_useFileThumbnails->isChecked(),
KConfigBase::Normal | KConfigBase::Global);
globalConfig.sync();
+
+ settings->setShowSelectionToggle(m_showSelectionToggle->isChecked());
}
void GeneralViewSettingsPage::restoreDefaults()
m_maxPreviewSize->setTickPosition(QSlider::TicksBelow);
KConfigGroup globalConfig(KGlobal::config(), "PreviewSettings");
+ // TODO: The default value of 5 MB must match with the default value inside
+ // kdelibs/kio/kio/previewjob.cpp. Maybe a static getter method in PreviewJob
+ // should be added for getting the default size?
const int maxByteSize = globalConfig.readEntry("MaximumSize", 5 * 1024 * 1024 /* 5 MB */);
int maxMByteSize = maxByteSize / (1024 * 1024);
if (maxMByteSize < 1) {
const bool useFileThumbnails = globalConfig.readEntry("UseFileThumbnails", true);
m_useFileThumbnails->setChecked(useFileThumbnails);
+
+ m_showSelectionToggle->setChecked(settings->showSelectionToggle());
}
#include "generalviewsettingspage.moc"