Commit 6420d5f9 authored by Peter Penz's avatar Peter Penz
Browse files

provide a config module for the settings GUI of the Dolphin views, so that it...

provide a config module for the settings GUI of the Dolphin views, so that it can be embedded into Konqueror

CCMAIL: faure@kde.org

svn path=/trunk/KDE/kdebase/apps/; revision=789209
parent cfb135f2
......@@ -19,7 +19,6 @@ set(dolphinprivate_LIB_SRCS
dolphincolumnview.cpp
dolphincolumnwidget.cpp
dolphindropcontroller.cpp
dolphinfileitemdelegate.cpp
dolphinsortfilterproxymodel.cpp
draganddrophelper.cpp
dolphinmodel.cpp
......@@ -41,8 +40,6 @@ kde4_add_kcfg_files(dolphinprivate_LIB_SRCS
dolphin_iconsmodesettings.kcfgc
dolphin_generalsettings.kcfgc)
kde4_add_library(dolphinprivate SHARED ${dolphinprivate_LIB_SRCS})
find_package(Nepomuk)
......@@ -80,44 +77,48 @@ install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
##########################################
set(dolphin_SRCS
additionalinfodialog.cpp
applyviewpropsjob.cpp
columnviewsettingspage.cpp
detailsviewsettingspage.cpp
dolphinapplication.cpp
dolphinfontrequester.cpp
dolphinmainwindow.cpp
dolphinnewmenu.cpp
dolphinviewcontainer.cpp
dolphinstatusbar.cpp
dolphindirlister.cpp
dolphincontextmenu.cpp
dolphinfileplacesview.cpp
dolphinsettingsdialog.cpp
draganddrophelper.cpp
filterbar.cpp
generalsettingspage.cpp
generalviewsettingspage.cpp
iconsizedialog.cpp
iconsviewsettingspage.cpp
infosidebarpage.cpp
main.cpp
metadatawidget.cpp
commentwidget.cpp
commenteditwidget.cpp
metatextlabel.cpp
pixmapviewer.cpp
settingspagebase.cpp
sidebarpage.cpp
startupsettingspage.cpp
statusbarspaceinfo.cpp
statusbarmessagelabel.cpp
treeviewcontextmenu.cpp
treeviewsidebarpage.cpp
sidebartreeview.cpp
viewpropertiesdialog.cpp
viewsettingspage.cpp
viewpropsprogressinfo.cpp )
additionalinfodialog.cpp
applyviewpropsjob.cpp
columnviewsettingspage.cpp
commentwidget.cpp
commenteditwidget.cpp
detailsviewsettingspage.cpp
dolphinapplication.cpp
dolphinfontrequester.cpp
dolphinmainwindow.cpp
dolphinnewmenu.cpp
dolphinviewcontainer.cpp
dolphinstatusbar.cpp
dolphindirlister.cpp
dolphincontextmenu.cpp
dolphinfileplacesview.cpp
dolphinsettingsdialog.cpp
draganddrophelper.cpp
filterbar.cpp
generalsettingspage.cpp
generalviewsettingspage.cpp
iconsizedialog.cpp
iconsviewsettingspage.cpp
infosidebarpage.cpp
main.cpp
metadatawidget.cpp
metatextlabel.cpp
pixmapviewer.cpp
settingspagebase.cpp
sidebarpage.cpp
startupsettingspage.cpp
statusbarspaceinfo.cpp
statusbarmessagelabel.cpp
treeviewcontextmenu.cpp
treeviewsidebarpage.cpp
sidebartreeview.cpp
viewpropertiesdialog.cpp
viewsettingspage.cpp
viewsettingspagebase.cpp
viewpropsprogressinfo.cpp)
kde4_add_kcfg_files(dolphin_SRCS
dolphin_folderspanelsettings.kcfgc)
if(Nepomuk_FOUND)
set(dolphin_SRCS
......@@ -152,9 +153,40 @@ endif (Nepomuk_FOUND)
install(TARGETS dolphin DESTINATION ${BIN_INSTALL_DIR})
##########################################
set(kcm_dolphin_PART_SRCS
kcmdolphin.cpp
columnviewsettingspage.cpp
detailsviewsettingspage.cpp
dolphinfontrequester.cpp
dolphinsettings.cpp
generalviewsettingspage.cpp
iconsizedialog.cpp
iconsviewsettingspage.cpp
pixmapviewer.cpp
viewsettingspagebase.cpp
viewproperties.cpp)
kde4_add_kcfg_files(kcm_dolphin_PART_SRCS
dolphin_columnmodesettings.kcfgc
dolphin_directoryviewpropertysettings.kcfgc
dolphin_detailsmodesettings.kcfgc
dolphin_iconsmodesettings.kcfgc
dolphin_generalsettings.kcfgc)
kde4_add_plugin(kcm_dolphin ${kcm_dolphin_PART_SRCS})
target_link_libraries(kcm_dolphin ${KDE4_KDEUI_LIBS} ${KDE4_KFILE_LIBS} )
if (Nepomuk_FOUND)
target_link_libraries(kcm_dolphin ${NEPOMUK_LIBRARIES})
endif (Nepomuk_FOUND)
install(TARGETS kcm_dolphin DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ###############
install( FILES dolphin.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES dolphin_directoryviewpropertysettings.kcfg dolphin_generalsettings.kcfg dolphin_columnmodesettings.kcfg dolphin_iconsmodesettings.kcfg dolphin_detailsmodesettings.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES dolphinui.rc DESTINATION ${DATA_INSTALL_DIR}/dolphin )
install( FILES kcmdolphin.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
\ No newline at end of file
......@@ -35,10 +35,8 @@
#include <QSlider>
#include <QRadioButton>
ColumnViewSettingsPage::ColumnViewSettingsPage(DolphinMainWindow* mainWindow,
QWidget* parent) :
KVBox(parent),
m_mainWindow(mainWindow),
ColumnViewSettingsPage::ColumnViewSettingsPage(QWidget* parent) :
ViewSettingsPageBase(parent),
m_smallIconSize(0),
m_mediumIconSize(0),
m_largeIconSize(0),
......@@ -63,6 +61,7 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(DolphinMainWindow* mainWindow,
m_columnWidthSlider->setPageStep(1);
m_columnWidthSlider->setTickPosition(QSlider::TicksBelow);
QLabel* largeLabel = new QLabel(i18nc("@item:inrange Column Width", "Large"), columnWidthBox);
connect(m_columnWidthSlider, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
QHBoxLayout* columnWidthLayout = new QHBoxLayout(columnWidthBox);
columnWidthLayout->addWidget(smallLabel);
......@@ -76,6 +75,9 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(DolphinMainWindow* mainWindow,
m_smallIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Small"), this);
m_mediumIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Medium"), this);
m_largeIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Large"), this);
connect(m_smallIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_mediumIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_largeIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QButtonGroup* iconSizeGroup = new QButtonGroup(this);
iconSizeGroup->addButton(m_smallIconSize);
......@@ -93,6 +95,7 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(DolphinMainWindow* mainWindow,
QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textBox);
m_fontRequester = new DolphinFontRequester(textBox);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
QHBoxLayout* textLayout = new QHBoxLayout(textBox);
textLayout->addWidget(fontLabel);
......
......@@ -20,7 +20,7 @@
#ifndef COLUMNVIEWSETTINGSPAGE_H
#define COLUMNVIEWSETTINGSPAGE_H
#include <kvbox.h>
#include <viewsettingspagebase.h>
class DolphinMainWindow;
class DolphinFontRequester;
......@@ -31,12 +31,12 @@ class QRadioButton;
* @brief Represents the page from the Dolphin Settings which allows
* to modify the settings for the details view.
*/
class ColumnViewSettingsPage : public KVBox
class ColumnViewSettingsPage : public ViewSettingsPageBase
{
Q_OBJECT
public:
ColumnViewSettingsPage(DolphinMainWindow* mainWindow, QWidget* parent);
ColumnViewSettingsPage(QWidget* parent);
virtual ~ColumnViewSettingsPage();
/**
......@@ -44,16 +44,15 @@ public:
* The settings are persisted automatically when
* closing Dolphin.
*/
void applySettings();
virtual void applySettings();
/** Restores the settings to default values. */
void restoreDefaults();
virtual void restoreDefaults();
private:
void loadSettings();
private:
DolphinMainWindow* m_mainWindow;
QRadioButton* m_smallIconSize;
QRadioButton* m_mediumIconSize;
QRadioButton* m_largeIconSize;
......
......@@ -35,10 +35,8 @@
#include <QRadioButton>
#include <QtGui/QSpinBox>
DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
QWidget* parent) :
KVBox(parent),
m_mainWindow(mainWindow),
DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget* parent) :
ViewSettingsPageBase(parent),
m_smallIconSize(0),
m_mediumIconSize(0),
m_largeIconSize(0),
......@@ -59,6 +57,9 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
m_smallIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Small"), this);
m_mediumIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Medium"), this);
m_largeIconSize = new QRadioButton(i18nc("@option:radio Icon Size", "Large"), this);
connect(m_smallIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_mediumIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_largeIconSize, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QButtonGroup* iconSizeGroup = new QButtonGroup(this);
iconSizeGroup->addButton(m_smallIconSize);
......@@ -76,6 +77,7 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textBox);
m_fontRequester = new DolphinFontRequester(textBox);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
QHBoxLayout* textLayout = new QHBoxLayout(textBox);
textLayout->addWidget(fontLabel);
......@@ -83,6 +85,7 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(DolphinMainWindow* mainWindow,
// create "Expandable Folders" checkbox
m_expandableFolders = new QCheckBox(i18nc("@option:check", "Expandable Folders"), this);
connect(m_expandableFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
......
......@@ -20,9 +20,8 @@
#ifndef DETAILSVIEWSETTINGSPAGE_H
#define DETAILSVIEWSETTINGSPAGE_H
#include <kvbox.h>
#include <viewsettingspagebase.h>
class DolphinMainWindow;
class DolphinFontRequester;
class QCheckBox;
class QRadioButton;
......@@ -31,12 +30,12 @@ class QRadioButton;
* @brief Represents the page from the Dolphin Settings which allows
* to modify the settings for the details view.
*/
class DetailsViewSettingsPage : public KVBox
class DetailsViewSettingsPage : public ViewSettingsPageBase
{
Q_OBJECT
public:
DetailsViewSettingsPage(DolphinMainWindow* mainWindow, QWidget* parent);
DetailsViewSettingsPage(QWidget* parent);
virtual ~DetailsViewSettingsPage();
/**
......@@ -44,16 +43,15 @@ public:
* The settings are persisted automatically when
* closing Dolphin.
*/
void applySettings();
virtual void applySettings();
/** Restores the settings to default values. */
void restoreDefaults();
virtual void restoreDefaults();
private:
void loadSettings();
private:
DolphinMainWindow* m_mainWindow;
QRadioButton* m_smallIconSize;
QRadioButton* m_mediumIconSize;
QRadioButton* m_largeIconSize;
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
<kcfgfile name="dolphinrc"/>
<group name="FoldersPanel">
<entry name="ShowHiddenFiles" type="Bool">
<label context="@label">Show hidden files</label>
<default>false</default>
</entry>
</group>
</kcfg>
File=dolphin_folderspanelsettings.kcfg
ClassName=FoldersPanelSettings
Singleton=true
Mutators=true
......@@ -32,6 +32,10 @@
<label context="@label">Browse through archives</label>
<default>false</default>
</entry>
<entry name="RenameInline" type="Bool">
<label context="@label">Rename inline</label>
<default>false</default>
</entry>
<entry name="ShowSelectionToggle" type="Bool">
<label context="@label">Show selection toggle</label>
<default>true</default>
......
......@@ -34,6 +34,8 @@ DolphinFontRequester::DolphinFontRequester(QWidget* parent) :
m_mode(SystemFont),
m_customFont()
{
setSpacing(KDialog::spacingHint());
m_modeCombo = new QComboBox(this);
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font"));
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font"));
......@@ -96,12 +98,14 @@ void DolphinFontRequester::openFontDialog()
if (result == KFontDialog::Accepted) {
m_customFont = font;
m_modeCombo->setFont(m_customFont);
emit changed();
}
}
void DolphinFontRequester::changeMode(int index)
{
setMode((index == CustomFont) ? CustomFont : SystemFont);
emit changed();
}
#include "dolphinfontrequester.moc"
......@@ -57,6 +57,10 @@ public:
void setCustomFont(const QFont& font);
QFont customFont() const;
signals:
/** Is emitted, if the font has been changed. */
void changed();
protected:
bool event(QEvent* event);
......
......@@ -21,7 +21,6 @@
#include "dolphincategorydrawer.h"
#include "dolphincontroller.h"
#include "dolphinfileitemdelegate.h"
#include "dolphinsettings.h"
#include "dolphin_iconsmodesettings.h"
#include "dolphin_generalsettings.h"
......@@ -31,6 +30,7 @@
#include <kcategorizedsortfilterproxymodel.h>
#include <kdialog.h>
#include <kdirmodel.h>
#include <kfileitemdelegate.h>
#include <QAbstractProxyModel>
#include <QApplication>
......@@ -257,8 +257,7 @@ void DolphinIconsView::wheelEvent(QWheelEvent* event)
void DolphinIconsView::showEvent(QShowEvent* event)
{
Q_ASSERT(qobject_cast<DolphinFileItemDelegate*>(itemDelegate()) != 0);
DolphinFileItemDelegate* delegate = static_cast<DolphinFileItemDelegate*>(itemDelegate());
KFileItemDelegate* delegate = dynamic_cast<KFileItemDelegate*>(itemDelegate());
delegate->setMaximumSize(m_itemSize);
KCategorizedView::showEvent(event);
......@@ -428,7 +427,7 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount)
m_controller->setZoomInPossible(isZoomInPossible());
m_controller->setZoomOutPossible(isZoomOutPossible());
DolphinFileItemDelegate* delegate = qobject_cast<DolphinFileItemDelegate*>(itemDelegate());
KFileItemDelegate* delegate = dynamic_cast<KFileItemDelegate*>(itemDelegate());
if (delegate != 0) {
delegate->setMaximumSize(m_itemSize);
}
......
......@@ -32,9 +32,7 @@
DolphinSettingsDialog::DolphinSettingsDialog(DolphinMainWindow* mainWindow) :
KPageDialog(mainWindow),
m_startupSettingsPage(0),
m_generalSettingsPage(0),
m_viewSettingsPage(0)
m_pages()
{
const QSize minSize = minimumSize();
......@@ -43,25 +41,33 @@ DolphinSettingsDialog::DolphinSettingsDialog(DolphinMainWindow* mainWindow) :
setFaceType(List);
setCaption(i18nc("@title:window", "Dolphin Preferences"));
setButtons(Ok | Apply | Cancel | Default);
enableButtonApply(false);
setDefaultButton(Ok);
m_startupSettingsPage = new StartupSettingsPage(mainWindow, this);
KPageWidgetItem* startupSettingsFrame = addPage(m_startupSettingsPage,
StartupSettingsPage* startupSettingsPage = new StartupSettingsPage(mainWindow, this);
KPageWidgetItem* startupSettingsFrame = addPage(startupSettingsPage,
i18nc("@title:group", "Startup"));
startupSettingsFrame->setIcon(KIcon("go-home"));
connect(startupSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
m_viewSettingsPage = new ViewSettingsPage(mainWindow, this);
KPageWidgetItem* viewSettingsFrame = addPage(m_viewSettingsPage,
ViewSettingsPage* viewSettingsPage = new ViewSettingsPage(mainWindow, this);
KPageWidgetItem* viewSettingsFrame = addPage(viewSettingsPage,
i18nc("@title:group", "View Modes"));
viewSettingsFrame->setIcon(KIcon("view-choose"));
connect(viewSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
m_generalSettingsPage = new GeneralSettingsPage(mainWindow, this);
KPageWidgetItem* generalSettingsFrame = addPage(m_generalSettingsPage,
GeneralSettingsPage* generalSettingsPage = new GeneralSettingsPage(mainWindow, this);
KPageWidgetItem* generalSettingsFrame = addPage(generalSettingsPage,
i18nc("@title:group General settings", "General"));
generalSettingsFrame->setIcon(KIcon("system-run"));
connect(generalSettingsPage, SIGNAL(changed()), this, SLOT(enableApply()));
const KConfigGroup dialogConfig(KSharedConfig::openConfig("dolphinrc"), "SettingsDialog");
restoreDialogSize(dialogConfig);
m_pages.append(startupSettingsPage);
m_pages.append(viewSettingsPage);
m_pages.append(generalSettingsPage);
}
DolphinSettingsDialog::~DolphinSettingsDialog()
......@@ -84,19 +90,24 @@ void DolphinSettingsDialog::slotButtonClicked(int button)
KPageDialog::slotButtonClicked(button);
}
void DolphinSettingsDialog::enableApply()
{
enableButtonApply(true);
}
void DolphinSettingsDialog::applySettings()
{
m_startupSettingsPage->applySettings();
m_generalSettingsPage->applySettings();
m_viewSettingsPage->applySettings();
foreach (SettingsPageBase* page, m_pages) {
page->applySettings();
}
DolphinApplication::app()->refreshMainWindows();
}
void DolphinSettingsDialog::restoreDefaults()
{
m_startupSettingsPage->restoreDefaults();
m_generalSettingsPage->restoreDefaults();
m_viewSettingsPage->restoreDefaults();
foreach (SettingsPageBase* page, m_pages) {
page->restoreDefaults();
}
DolphinApplication::app()->refreshMainWindows();
}
......
......@@ -23,10 +23,8 @@
#include <kpagedialog.h>
class GeneralSettingsPage;
class StartupSettingsPage;
class ViewSettingsPage;
class DolphinMainWindow;
class SettingsPageBase;
/**
* @brief Settings dialog for Dolphin.
......@@ -47,14 +45,16 @@ protected slots:
/** @see KDialog::slotButtonClicked() */
virtual void slotButtonClicked(int button);
private slots:
/** Enables the Apply button. */
void enableApply();
private:
void applySettings();
void restoreDefaults();
private:
StartupSettingsPage* m_startupSettingsPage;
GeneralSettingsPage* m_generalSettingsPage;
ViewSettingsPage* m_viewSettingsPage;
QList<SettingsPageBase*> m_pages;
};
#endif
......@@ -35,10 +35,11 @@
GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* parent) :
SettingsPageBase(parent),
m_showDeleteCommand(0),
m_confirmMoveToTrash(0),
m_confirmDelete(0),
m_browseThroughArchives(0)
m_showDeleteCommand(0),
m_browseThroughArchives(0),
m_renameInline(0)
{
Q_UNUSED(mainWin);
......@@ -52,8 +53,10 @@ GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin, QWidget* pa
QGroupBox* confirmBox = new QGroupBox(i18nc("@title:group", "Ask For Confirmation When"), vBox);
m_confirmMoveToTrash = new QCheckBox(i18nc("@option:check Ask for Confirmation When",
"Moving files or folders to trash"), confirmBox);
connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_confirmDelete = new QCheckBox(i18nc("@option:check Ask for Confirmation When",
"Deleting files or folders"), confirmBox);
connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QVBoxLayout* confirmBoxLayout = new QVBoxLayout(confirmBox);
confirmBoxLayout->addWidget(m_confirmMoveToTrash);
......@@ -61,8 +64,13 @@ 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);
connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_browseThroughArchives = new QCheckBox(i18nc("@option:check", "Browse through archives"), vBox);
connect(m_browseThroughArchives, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), vBox);
connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
......@@ -93,6 +101,7 @@ void GeneralSettingsPage::applySettings()
kdeConfig.sync();
settings->setBrowseThroughArchives(m_browseThroughArchives->isChecked());
settings->setRenameInline(m_renameInline->isChecked());
}
void GeneralSettingsPage::restoreDefaults()
......@@ -117,6 +126,7 @@ void GeneralSettingsPage::loadSettings()
GeneralSettings* settings = DolphinSettings::instance().generalSettings();
m_browseThroughArchives->setChecked(settings->browseThroughArchives());
m_renameInline->setChecked(settings->renameInline());
}
#include "generalsettingspage.moc"
......@@ -47,11 +47,12 @@ private:
void loadSettings();
private:
QCheckBox* m_showDeleteCommand;
QCheckBox* m_confirmMoveToTrash;
QCheckBox* m_confirmDelete;
QCheckBox* m_showDeleteCommand;
QCheckBox* m_browseThroughArchives;
QCheckBox* m_renameInline;
};
#endif
......@@ -39,10 +39,10 @@
#include <klocale.h>
#include <khbox.h>
GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
GeneralViewSettingsPage::GeneralViewSettingsPage(const KUrl& url,
QWidget* parent) :
KVBox(parent),
m_mainWindow(mainWindow),
ViewSettingsPageBase(parent),
m_url(url),
m_localProps(0),
m_globalProps(0),
m_maxPreviewSize(0),
......@@ -60,7 +60,10 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
QGroupBox* propsBox = new QGroupBox(i18nc("@title:group", "View Properties"), this);
m_localProps = new QRadioButton(i18nc("@option:radio", "Remember view properties for each folder"), propsBox);
connect(m_localProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_globalProps = new QRadioButton(i18nc("@option:radio", "Use common view properties for all folders"), propsBox);
connect(m_globalProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);
propsBoxLayout->addWidget(m_localProps);
......@@ -82,13 +85,20 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
connect(m_spinBox, SIGNAL(valueChanged(int)),
m_maxPreviewSize, SLOT(setValue(int)));
connect(m_maxPreviewSize, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(m_spinBox, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
m_useFileThumbnails = new QCheckBox(i18nc("@option:check", "Use thumbnails embedded in files"), previewBox);
connect(m_useFileThumbnails, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QVBoxLayout* previewBoxLayout = new QVBoxLayout(previewBox);