┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/viewpropertiesdialog.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-02-17 20:04:06 +0000
committerPeter Penz <[email protected]>2007-02-17 20:04:06 +0000
commit13f0a26ccd4c2ac8429a7701b9cbc49f2c855f2d (patch)
treee1f86cd0cd8fecfc5cc73517cddf92b16bfc4cbb /src/viewpropertiesdialog.cpp
parente4dbe5626b092a884cfda0e99f0f0b4ba5cbc2ef (diff)
Improve usability of the viewproperties dialog: use 2 radiobuttons instead of one checkbox to make clear where the view properties are applied. Separate the apply-to-group visually from the 'Use as default for new folders' checkbox.
svn path=/trunk/KDE/kdebase/apps/; revision=634606
Diffstat (limited to 'src/viewpropertiesdialog.cpp')
-rw-r--r--src/viewpropertiesdialog.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp
index 48e565a09..8cedb73cb 100644
--- a/src/viewpropertiesdialog.cpp
+++ b/src/viewpropertiesdialog.cpp
@@ -26,11 +26,13 @@
#include "generalsettings.h"
#include "viewproperties.h"
+#include <assert.h>
+
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <assert.h>
+#include <QButtonGroup>
#include <QCheckBox>
#include <QComboBox>
#include <QGridLayout>
@@ -49,6 +51,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
m_sortOrder(0),
m_showPreview(0),
m_showHiddenFiles(0),
+ m_applyToCurrentFolder(0),
m_applyToSubFolders(0),
m_useAsDefault(0)
{
@@ -127,11 +130,28 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
// Only show the following settings if the view properties are remembered
// for each directory:
if (!DolphinSettings::instance().generalSettings()->globalViewProps()) {
- m_applyToSubFolders = new QCheckBox(i18n("Apply changes to all sub folders"), main);
- m_useAsDefault = new QCheckBox(i18n("Use as default"), main);
- topLayout->addWidget(m_applyToSubFolders);
+ // create 'Apply view properties to:' group
+ QGroupBox* applyBox = new QGroupBox(i18n("Apply view properties to:"), main);
+
+ m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), applyBox);
+ m_applyToCurrentFolder->setChecked(true);
+ m_applyToSubFolders = new QRadioButton(i18n("Current folder including all sub folders"), applyBox);
+
+ QButtonGroup* applyGroup = new QButtonGroup(this);
+ applyGroup->addButton(m_applyToCurrentFolder);
+ applyGroup->addButton(m_applyToSubFolders);
+
+ QVBoxLayout* applyBoxLayout = new QVBoxLayout(applyBox);
+ applyBoxLayout->addWidget(m_applyToCurrentFolder);
+ applyBoxLayout->addWidget(m_applyToSubFolders);
+
+ m_useAsDefault = new QCheckBox(i18n("Use as default for new folders"), main);
+
+ topLayout->addWidget(applyBox);
topLayout->addWidget(m_useAsDefault);
+ connect(m_applyToCurrentFolder, SIGNAL(clicked()),
+ this, SLOT(markAsDirty()));
connect(m_applyToSubFolders, SIGNAL(clicked()),
this, SLOT(markAsDirty()));
connect(m_useAsDefault, SIGNAL(clicked()),