Take care to listen for changes of the settings-widgets after loadSettings() is invoked, otherwise it is possible that a change is accidently indicated.

svn path=/trunk/KDE/kdebase/apps/; revision=1193350
This commit is contained in:
Peter Penz 2010-11-05 17:32:46 +00:00
parent d83a4ce51d
commit e3bd93fe73
10 changed files with 48 additions and 53 deletions

View file

@ -59,10 +59,8 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
propsBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); propsBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_localProps = new QRadioButton(i18nc("@option:radio", "Remember view properties for each folder"), propsBox); 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); 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); QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox);
propsBoxLayout->addWidget(m_localProps); propsBoxLayout->addWidget(m_localProps);
@ -73,13 +71,10 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
confirmBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); confirmBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_confirmMoveToTrash = new QCheckBox(i18nc("@option:check Ask for Confirmation When", m_confirmMoveToTrash = new QCheckBox(i18nc("@option:check Ask for Confirmation When",
"Moving files or folders to trash"), confirmBox); "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", m_confirmDelete = new QCheckBox(i18nc("@option:check Ask for Confirmation When",
"Deleting files or folders"), confirmBox); "Deleting files or folders"), confirmBox);
connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for Confirmation When", m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for Confirmation When",
"Closing windows with multiple tabs"), confirmBox); "Closing windows with multiple tabs"), confirmBox);
connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QVBoxLayout* confirmBoxLayout = new QVBoxLayout(confirmBox); QVBoxLayout* confirmBoxLayout = new QVBoxLayout(confirmBox);
confirmBoxLayout->addWidget(m_confirmMoveToTrash); confirmBoxLayout->addWidget(m_confirmMoveToTrash);
@ -88,30 +83,23 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
// 'Rename inline' // 'Rename inline'
m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), this); m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), this);
connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// 'Show tooltips' // 'Show tooltips'
QWidget* toolTipContainer = new QWidget(this); QWidget* toolTipContainer = new QWidget(this);
QHBoxLayout* toolTipsLayout = new QHBoxLayout(toolTipContainer); QHBoxLayout* toolTipsLayout = new QHBoxLayout(toolTipContainer);
toolTipsLayout->setMargin(0); toolTipsLayout->setMargin(0);
m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), toolTipContainer); m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), toolTipContainer);
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SLOT(updateConfigureButton()));
m_configureToolTips = new QLabel(toolTipContainer); m_configureToolTips = new QLabel(toolTipContainer);
connect(m_configureToolTips, SIGNAL(linkActivated(const QString&)),
this, SLOT(configureToolTips()));
toolTipsLayout->addWidget(m_showToolTips); toolTipsLayout->addWidget(m_showToolTips);
toolTipsLayout->addWidget(m_configureToolTips, 1, Qt::AlignLeft); toolTipsLayout->addWidget(m_configureToolTips, 1, Qt::AlignLeft);
// 'Show selection marker' // 'Show selection marker'
m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"), this); m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"), this);
connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// 'Natural sorting of items' // 'Natural sorting of items'
m_naturalSorting = new QCheckBox(i18nc("option:check", "Natural sorting of items"), this); m_naturalSorting = new QCheckBox(i18nc("option:check", "Natural sorting of items"), this);
connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
topLayout->addWidget(propsBox); topLayout->addWidget(propsBox);
topLayout->addWidget(confirmBox); topLayout->addWidget(confirmBox);
@ -122,6 +110,18 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) :
topLayout->addStretch(); topLayout->addStretch();
loadSettings(); loadSettings();
connect(m_localProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_globalProps, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showToolTips, SIGNAL(toggled(bool)), this, SLOT(updateConfigureButton()));
connect(m_configureToolTips, SIGNAL(linkActivated(const QString&)), this, SLOT(configureToolTips()));
connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
} }
BehaviorSettingsPage::~BehaviorSettingsPage() BehaviorSettingsPage::~BehaviorSettingsPage()

View file

@ -41,10 +41,8 @@ ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent) :
vBox->setSpacing(KDialog::spacingHint()); vBox->setSpacing(KDialog::spacingHint());
m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command"), vBox); m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command"), vBox);
connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_showCopyMoveMenu = new QCheckBox(i18nc("@option:check", "Show 'Copy To' and 'Move To' commands"), vBox); m_showCopyMoveMenu = new QCheckBox(i18nc("@option:check", "Show 'Copy To' and 'Move To' commands"), vBox);
connect(m_showCopyMoveMenu, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog layout
@ -54,6 +52,9 @@ ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent) :
topLayout->addWidget(vBox); topLayout->addWidget(vBox);
loadSettings(); loadSettings();
connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showCopyMoveMenu, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
} }
ContextMenuSettingsPage::~ContextMenuSettingsPage() ContextMenuSettingsPage::~ContextMenuSettingsPage()

View file

@ -65,8 +65,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
m_previewPluginsList = new QListWidget(this); m_previewPluginsList = new QListWidget(this);
m_previewPluginsList->setSortingEnabled(true); m_previewPluginsList->setSortingEnabled(true);
m_previewPluginsList->setSelectionMode(QAbstractItemView::NoSelection); m_previewPluginsList->setSelectionMode(QAbstractItemView::NoSelection);
connect(m_previewPluginsList, SIGNAL(itemClicked(QListWidgetItem*)),
this, SIGNAL(changed()));
QVBoxLayout* listBoxLayout = new QVBoxLayout(listBox); QVBoxLayout* listBoxLayout = new QVBoxLayout(listBox);
listBoxLayout->addWidget(m_previewPluginsList); listBoxLayout->addWidget(m_previewPluginsList);
@ -81,8 +79,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
m_localFileSizeBox->setSingleStep(1); m_localFileSizeBox->setSingleStep(1);
m_localFileSizeBox->setSuffix(QLatin1String(" MB")); m_localFileSizeBox->setSuffix(QLatin1String(" MB"));
m_localFileSizeBox->setRange(0, 9999); /* MB */ m_localFileSizeBox->setRange(0, 9999); /* MB */
connect(m_localFileSizeBox, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Remote files above:> XX MByte", QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Remote files above:> XX MByte",
"Remote files above:"), this); "Remote files above:"), this);
@ -91,8 +87,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
m_remoteFileSizeBox->setSingleStep(1); m_remoteFileSizeBox->setSingleStep(1);
m_remoteFileSizeBox->setSuffix(QLatin1String(" MB")); m_remoteFileSizeBox->setSuffix(QLatin1String(" MB"));
m_remoteFileSizeBox->setRange(0, 9999); /* MB */ m_remoteFileSizeBox->setRange(0, 9999); /* MB */
connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
QGridLayout* fileSizeBoxLayout = new QGridLayout(fileSizeBox); QGridLayout* fileSizeBoxLayout = new QGridLayout(fileSizeBox);
fileSizeBoxLayout->addWidget(localFileSizeLabel, 0, 0, Qt::AlignRight); fileSizeBoxLayout->addWidget(localFileSizeLabel, 0, 0, Qt::AlignRight);
@ -104,6 +98,10 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
topLayout->addWidget(fileSizeBox); topLayout->addWidget(fileSizeBox);
loadSettings(); loadSettings();
connect(m_previewPluginsList, SIGNAL(itemClicked(QListWidgetItem*)), this, SIGNAL(changed()));
connect(m_localFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
} }

View file

@ -40,10 +40,8 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) :
vBox->setSpacing(KDialog::spacingHint()); vBox->setSpacing(KDialog::spacingHint());
m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), vBox); m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), vBox);
connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), vBox); m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), vBox);
connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog layout
@ -53,6 +51,9 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) :
topLayout->addWidget(vBox); topLayout->addWidget(vBox);
loadSettings(); loadSettings();
connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
} }
StatusBarSettingsPage::~StatusBarSettingsPage() StatusBarSettingsPage::~StatusBarSettingsPage()

View file

@ -50,20 +50,16 @@ NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) :
mouseBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); mouseBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_singleClick = new QRadioButton(i18nc("@option:check Mouse Settings", m_singleClick = new QRadioButton(i18nc("@option:check Mouse Settings",
"Single-click to open files and folders"), mouseBox); "Single-click to open files and folders"), mouseBox);
connect(m_singleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_doubleClick = new QRadioButton(i18nc("@option:check Mouse Settings", m_doubleClick = new QRadioButton(i18nc("@option:check Mouse Settings",
"Double-click to open files and folders"), mouseBox); "Double-click to open files and folders"), mouseBox);
connect(m_doubleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
QVBoxLayout* mouseBoxLayout = new QVBoxLayout(mouseBox); QVBoxLayout* mouseBoxLayout = new QVBoxLayout(mouseBox);
mouseBoxLayout->addWidget(m_singleClick); mouseBoxLayout->addWidget(m_singleClick);
mouseBoxLayout->addWidget(m_doubleClick); mouseBoxLayout->addWidget(m_doubleClick);
m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder"), vBox); m_openArchivesAsFolder = new QCheckBox(i18nc("@option:check", "Open archives as folder"), vBox);
connect(m_openArchivesAsFolder, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"), vBox); m_autoExpandFolders = new QCheckBox(i18nc("option:check", "Open folders during drag operations"), vBox);
connect(m_autoExpandFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog layout
@ -73,6 +69,11 @@ NavigationSettingsPage::NavigationSettingsPage(QWidget* parent) :
topLayout->addWidget(vBox); topLayout->addWidget(vBox);
loadSettings(); loadSettings();
connect(m_singleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_doubleClick, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_openArchivesAsFolder, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
connect(m_autoExpandFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
} }
NavigationSettingsPage::~NavigationSettingsPage() NavigationSettingsPage::~NavigationSettingsPage()

View file

@ -98,8 +98,7 @@ StartupSettingsPage::StartupSettingsPage(const KUrl& url, QWidget* parent) :
loadSettings(); loadSettings();
// Connecting the signals must be done after loading the settings connect(m_homeUrl, SIGNAL(textChanged(const QString&)), this, SLOT(slotSettingsChanged()));
connect(m_homeUrl, SIGNAL(textChanged(const QString&)), this, SIGNAL(changed()));
connect(m_splitView, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged())); connect(m_splitView, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
connect(m_editableUrl, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged())); connect(m_editableUrl, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
connect(m_showFullPath, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged())); connect(m_showFullPath, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));

View file

@ -37,7 +37,6 @@ TrashSettingsPage::TrashSettingsPage(QWidget* parent) :
vBox->setSpacing(spacing); vBox->setSpacing(spacing);
m_proxy = new KCModuleProxy("kcmtrash"); m_proxy = new KCModuleProxy("kcmtrash");
connect(m_proxy, SIGNAL(changed(bool)), this, SIGNAL(changed()));
topLayout->addWidget(m_proxy); topLayout->addWidget(m_proxy);
// Add a dummy widget with no restriction regarding // Add a dummy widget with no restriction regarding
@ -47,6 +46,8 @@ TrashSettingsPage::TrashSettingsPage(QWidget* parent) :
topLayout->addWidget(vBox); topLayout->addWidget(vBox);
loadSettings(); loadSettings();
connect(m_proxy, SIGNAL(changed(bool)), this, SIGNAL(changed()));
} }
TrashSettingsPage::~TrashSettingsPage() TrashSettingsPage::~TrashSettingsPage()

View file

@ -61,18 +61,12 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(QWidget* parent) :
m_iconSizeGroupBox->setDefaultSizeRange(min, max); m_iconSizeGroupBox->setDefaultSizeRange(min, max);
m_iconSizeGroupBox->setPreviewSizeRange(min, max); m_iconSizeGroupBox->setPreviewSizeRange(min, max);
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)),
this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)),
this, SIGNAL(changed()));
// create "Text" properties // create "Text" properties
QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this); QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this);
textGroup->setSizePolicy(sizePolicy); textGroup->setSizePolicy(sizePolicy);
QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup); QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
m_fontRequester = new DolphinFontRequester(textGroup); m_fontRequester = new DolphinFontRequester(textGroup);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup); QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup);
m_textWidthBox = new KComboBox(textGroup); m_textWidthBox = new KComboBox(textGroup);
@ -80,7 +74,6 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(QWidget* parent) :
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium"));
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large"));
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Huge")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Huge"));
connect(m_textWidthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
QGridLayout* textGroupLayout = new QGridLayout(textGroup); QGridLayout* textGroupLayout = new QGridLayout(textGroup);
textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight); textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight);
@ -94,6 +87,11 @@ ColumnViewSettingsPage::ColumnViewSettingsPage(QWidget* parent) :
new QWidget(this); new QWidget(this);
loadSettings(); loadSettings();
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)), this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)), this, SIGNAL(changed()));
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
connect(m_textWidthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
} }
ColumnViewSettingsPage::~ColumnViewSettingsPage() ColumnViewSettingsPage::~ColumnViewSettingsPage()

View file

@ -61,18 +61,12 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget* parent) :
m_iconSizeGroupBox->setDefaultSizeRange(min, max); m_iconSizeGroupBox->setDefaultSizeRange(min, max);
m_iconSizeGroupBox->setPreviewSizeRange(min, max); m_iconSizeGroupBox->setPreviewSizeRange(min, max);
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)),
this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)),
this, SIGNAL(changed()));
// create "Text" properties // create "Text" properties
QWidget* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this); QWidget* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this);
textGroup->setSizePolicy(sizePolicy); textGroup->setSizePolicy(sizePolicy);
QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup); QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
m_fontRequester = new DolphinFontRequester(textGroup); m_fontRequester = new DolphinFontRequester(textGroup);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
QHBoxLayout* textLayout = new QHBoxLayout(textGroup); QHBoxLayout* textLayout = new QHBoxLayout(textGroup);
textLayout->addWidget(fontLabel, 0, Qt::AlignRight); textLayout->addWidget(fontLabel, 0, Qt::AlignRight);
@ -80,7 +74,6 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget* parent) :
// create "Expandable Folders" checkbox // create "Expandable Folders" checkbox
m_expandableFolders = new QCheckBox(i18nc("@option:check", "Expandable folders"), this); 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 // Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout // a vertical resizing. This assures that the dialog layout
@ -88,6 +81,11 @@ DetailsViewSettingsPage::DetailsViewSettingsPage(QWidget* parent) :
new QWidget(this); new QWidget(this);
loadSettings(); loadSettings();
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)), this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)), this, SIGNAL(changed()));
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
connect(m_expandableFolders, SIGNAL(toggled(bool)), this, SIGNAL(changed()));
} }
DetailsViewSettingsPage::~DetailsViewSettingsPage() DetailsViewSettingsPage::~DetailsViewSettingsPage()

View file

@ -67,11 +67,6 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
m_iconSizeGroupBox->setDefaultSizeRange(min, max); m_iconSizeGroupBox->setDefaultSizeRange(min, max);
m_iconSizeGroupBox->setPreviewSizeRange(min, max); m_iconSizeGroupBox->setPreviewSizeRange(min, max);
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)),
this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)),
this, SIGNAL(changed()));
// create 'Text' group for selecting the font, the number of lines // create 'Text' group for selecting the font, the number of lines
// and the text width // and the text width
QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this); QGroupBox* textGroup = new QGroupBox(i18nc("@title:group", "Text"), this);
@ -79,13 +74,11 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup); QLabel* fontLabel = new QLabel(i18nc("@label:listbox", "Font:"), textGroup);
m_fontRequester = new DolphinFontRequester(textGroup); m_fontRequester = new DolphinFontRequester(textGroup);
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
QLabel* textlinesCountLabel = new QLabel(i18nc("@label:textbox", "Number of lines:"), textGroup); QLabel* textlinesCountLabel = new QLabel(i18nc("@label:textbox", "Number of lines:"), textGroup);
m_textlinesCountBox = new KIntSpinBox(textGroup); m_textlinesCountBox = new KIntSpinBox(textGroup);
m_textlinesCountBox->setMinimum(1); m_textlinesCountBox->setMinimum(1);
m_textlinesCountBox->setMaximum(5); m_textlinesCountBox->setMaximum(5);
connect(m_textlinesCountBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup); QLabel* textWidthLabel = new QLabel(i18nc("@label:listbox", "Text width:"), textGroup);
m_textWidthBox = new KComboBox(textGroup); m_textWidthBox = new KComboBox(textGroup);
@ -93,7 +86,6 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Medium"));
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Large"));
m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Huge")); m_textWidthBox->addItem(i18nc("@item:inlistbox Text width", "Huge"));
connect(m_textWidthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
QGridLayout* textGroupLayout = new QGridLayout(textGroup); QGridLayout* textGroupLayout = new QGridLayout(textGroup);
textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight); textGroupLayout->addWidget(fontLabel, 0, 0, Qt::AlignRight);
@ -111,7 +103,6 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
m_arrangementBox = new KComboBox(gridGroup); m_arrangementBox = new KComboBox(gridGroup);
m_arrangementBox->addItem(i18nc("@item:inlistbox Arrangement", "Columns")); m_arrangementBox->addItem(i18nc("@item:inlistbox Arrangement", "Columns"));
m_arrangementBox->addItem(i18nc("@item:inlistbox Arrangement", "Rows")); m_arrangementBox->addItem(i18nc("@item:inlistbox Arrangement", "Rows"));
connect(m_arrangementBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
QLabel* gridSpacingLabel = new QLabel(i18nc("@label:listbox", "Grid spacing:"), gridGroup); QLabel* gridSpacingLabel = new QLabel(i18nc("@label:listbox", "Grid spacing:"), gridGroup);
m_gridSpacingBox = new KComboBox(gridGroup); m_gridSpacingBox = new KComboBox(gridGroup);
@ -119,7 +110,6 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Small")); m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Small"));
m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Medium")); m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Medium"));
m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Large")); m_gridSpacingBox->addItem(i18nc("@item:inlistbox Grid spacing", "Large"));
connect(m_gridSpacingBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
QGridLayout* gridGroupLayout = new QGridLayout(gridGroup); QGridLayout* gridGroupLayout = new QGridLayout(gridGroup);
gridGroupLayout->addWidget(arrangementLabel, 0, 0, Qt::AlignRight); gridGroupLayout->addWidget(arrangementLabel, 0, 0, Qt::AlignRight);
@ -133,6 +123,14 @@ IconsViewSettingsPage::IconsViewSettingsPage(QWidget* parent) :
new QWidget(this); new QWidget(this);
loadSettings(); loadSettings();
connect(m_iconSizeGroupBox, SIGNAL(defaultSizeChanged(int)), this, SIGNAL(changed()));
connect(m_iconSizeGroupBox, SIGNAL(previewSizeChanged(int)), this, SIGNAL(changed()));
connect(m_fontRequester, SIGNAL(changed()), this, SIGNAL(changed()));
connect(m_textlinesCountBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed()));
connect(m_textWidthBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
connect(m_arrangementBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
connect(m_gridSpacingBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed()));
} }
IconsViewSettingsPage::~IconsViewSettingsPage() IconsViewSettingsPage::~IconsViewSettingsPage()