diff options
| author | Peter Penz <[email protected]> | 2006-12-07 20:51:05 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2006-12-07 20:51:05 +0000 |
| commit | 31d14571959f1bf750ccc43c15d71ca9338baaaf (patch) | |
| tree | 238becaaa9a5cf93c86d4c5f196d602a6a1f21d7 /src/viewpropertiesdialog.cpp | |
| parent | 904168ad2a0e2baff0570658c8f9a9c3feba4554 (diff) | |
Apply the view properties to sub directories without using a modal window. This allows the user to proceed with the work during the view properties are applied.
svn path=/trunk/playground/utils/dolphin/; revision=611369
Diffstat (limited to 'src/viewpropertiesdialog.cpp')
| -rw-r--r-- | src/viewpropertiesdialog.cpp | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp index de5c74a01..b13b3d4a6 100644 --- a/src/viewpropertiesdialog.cpp +++ b/src/viewpropertiesdialog.cpp @@ -99,22 +99,9 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : propsBoxLayout->addWidget(m_sortOrder, 2, 1); propsBoxLayout->addWidget(m_showHiddenFiles, 3, 0); - // create 'Apply view properties to:' group - QGroupBox* buttonBox = new QGroupBox(i18n("Apply view properties to:"), main); - m_applyToCurrentFolder = new QRadioButton(i18n("Current folder"), buttonBox); - m_applyToSubFolders = new QRadioButton(i18n("Current folder including all sub folders"), buttonBox); - m_applyToAllFolders = new QRadioButton(i18n("All folders"), buttonBox); - - QVBoxLayout* buttonBoxLayout = new QVBoxLayout(); - buttonBoxLayout->addWidget(m_applyToCurrentFolder); - buttonBoxLayout->addWidget(m_applyToSubFolders); - buttonBoxLayout->addWidget(m_applyToAllFolders); - buttonBox->setLayout(buttonBoxLayout); - - m_applyToCurrentFolder->setChecked(true); - + m_applyToSubFolders = new QCheckBox(i18n("Apply changes to all sub folders"), main); topLayout->addWidget(propsBox); - topLayout->addWidget(buttonBox); + topLayout->addWidget(m_applyToSubFolders); connect(m_viewMode, SIGNAL(activated(int)), this, SLOT(slotViewModeChanged(int))); @@ -124,12 +111,9 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : this, SLOT(slotSortOrderChanged(int))); connect(m_showHiddenFiles, SIGNAL(clicked()), this, SLOT(slotShowHiddenFilesChanged())); - connect(m_applyToCurrentFolder, SIGNAL(clicked()), - this, SLOT(markAsDirty())); + connect(m_applyToSubFolders, SIGNAL(clicked()), this, SLOT(markAsDirty())); - connect(m_applyToAllFolders, SIGNAL(clicked()), - this, SLOT(markAsDirty())); connect(this, SIGNAL(okClicked()), this, SLOT(slotOk())); connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply())); @@ -196,29 +180,17 @@ void ViewPropertiesDialog::markAsDirty() void ViewPropertiesDialog::applyViewProperties() { - if (m_applyToAllFolders->isChecked()) { - if (m_isDirty) { - const QString text(i18n("The view properties of all folders will be replaced. Do you want to continue?")); - if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { - return; - } - } - - //ViewProperties props(QDir::homePath()); - //props.setViewMode(m_viewProps->viewMode()); - //props.setSorting(m_viewProps->sorting()); - //props.setSortOrder(m_viewProps->sortOrder()); - //props.setShowHiddenFilesEnabled(m_viewProps->isShowHiddenFilesEnabled()); - //props.setValidForSubDirs(true); - } - else if (m_applyToSubFolders->isChecked() && m_isDirty) { - const QString text(i18n("The view properties of all sub folders will be replaced. Do you want to continue?")); + if (m_applyToSubFolders->isChecked() && m_isDirty) { + const QString text(i18n("The view properties of all sub folders will be changed. Do you want to continue?")); if (KMessageBox::questionYesNo(this, text) == KMessageBox::No) { return; } - ViewPropsProgressInfo dlg(this, m_dolphinView->url(), m_viewProps); - dlg.exec(); + ViewPropsProgressInfo* info = new ViewPropsProgressInfo(m_dolphinView, + m_dolphinView->url(), + *m_viewProps); + info->setWindowModality(Qt::NonModal); + info->show(); } m_viewProps->save(); |
