diff options
| author | Peter Penz <[email protected]> | 2007-10-13 22:31:05 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-10-13 22:31:05 +0000 |
| commit | 1edf513e227dade81a51e4ab56f05d2e48f1e59b (patch) | |
| tree | d188f3a8b214e93ec1cebaed59280316b4d935f2 /src | |
| parent | 95042476f62370fc3dde8f53869da23ebe8d079d (diff) | |
allow to configure whether file thumbnails should be embedded for the file preview (on per default)
BUG: 150028
svn path=/trunk/KDE/kdebase/apps/; revision=724946
Diffstat (limited to 'src')
| -rw-r--r-- | src/generalviewsettingspage.cpp | 15 | ||||
| -rw-r--r-- | src/generalviewsettingspage.h | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/generalviewsettingspage.cpp b/src/generalviewsettingspage.cpp index 1bb4e81fc..15a985cf3 100644 --- a/src/generalviewsettingspage.cpp +++ b/src/generalviewsettingspage.cpp @@ -25,8 +25,9 @@ #include "dolphin_generalsettings.h" -#include <QLabel> +#include <QCheckBox> #include <QGroupBox> +#include <QLabel> #include <QRadioButton> #include <QSlider> #include <QSpinBox> @@ -45,7 +46,8 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow, m_localProps(0), m_globalProps(0), m_maxPreviewSize(0), - m_spinBox(0) + m_spinBox(0), + m_useFileThumbnails(0) { const int spacing = KDialog::spacingHint(); const int margin = KDialog::marginHint(); @@ -79,9 +81,12 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow, connect(m_spinBox, SIGNAL(valueChanged(int)), m_maxPreviewSize, SLOT(setValue(int))); + m_useFileThumbnails = new QCheckBox(i18n("Use thumbnails embedded in files"), previewBox); + QVBoxLayout* previewBoxLayout = new QVBoxLayout(previewBox); previewBoxLayout->addWidget(maxFileSize); previewBoxLayout->addWidget(vBox); + previewBoxLayout->addWidget(m_useFileThumbnails); // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout @@ -120,6 +125,9 @@ void GeneralViewSettingsPage::applySettings() globalConfig.writeEntry("MaximumSize", byteCount, KConfigBase::Normal | KConfigBase::Global); + globalConfig.writeEntry("UseFileThumbnails", + m_useFileThumbnails->isChecked(), + KConfigBase::Normal | KConfigBase::Global); globalConfig.sync(); } @@ -161,6 +169,9 @@ void GeneralViewSettingsPage::loadSettings() m_maxPreviewSize->setValue(maxMByteSize); m_spinBox->setValue(m_maxPreviewSize->value()); + + const bool useFileThumbnails = globalConfig.readEntry("UseFileThumbnails", true); + m_useFileThumbnails->setChecked(useFileThumbnails); } #include "generalviewsettingspage.moc" diff --git a/src/generalviewsettingspage.h b/src/generalviewsettingspage.h index 9c5edecf3..5aad4be4f 100644 --- a/src/generalviewsettingspage.h +++ b/src/generalviewsettingspage.h @@ -23,6 +23,7 @@ #include <kvbox.h> class DolphinMainWindow; +class QCheckBox; class QRadioButton; class QSlider; class QSpinBox; @@ -58,6 +59,7 @@ private: QRadioButton* m_globalProps; QSlider* m_maxPreviewSize; QSpinBox* m_spinBox; + QCheckBox* m_useFileThumbnails; }; #endif |
