From 642110309ace0ec0da270615464d7d04944d5dcf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 20 Dec 2006 19:10:39 +0000 Subject: Let the user chose whether view properties should be remembered for each directory or whether they should be valid globally. Per default the view properties are remembered for each directory. For testing purposes the MIME type information is shown per default in the icons mode (thanks to Fredrik for the cool implementation in KFileItemDelegate!). svn path=/trunk/playground/utils/dolphin/; revision=615232 --- src/viewpropertiesdialog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/viewpropertiesdialog.cpp') diff --git a/src/viewpropertiesdialog.cpp b/src/viewpropertiesdialog.cpp index 8393401c7..3f440633f 100644 --- a/src/viewpropertiesdialog.cpp +++ b/src/viewpropertiesdialog.cpp @@ -47,7 +47,8 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : m_sortOrder(0), m_showPreview(0), m_showHiddenFiles(0), - m_applyToSubFolders(0) + m_applyToSubFolders(0), + m_useAsDefault(0) { assert(dolphinView != 0); @@ -110,8 +111,11 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : propsBoxLayout->addWidget(m_showHiddenFiles, 4, 0); m_applyToSubFolders = new QCheckBox(i18n("Apply changes to all sub folders"), main); + m_useAsDefault = new QCheckBox(i18n("Use as default"), main); + topLayout->addWidget(propsBox); topLayout->addWidget(m_applyToSubFolders); + topLayout->addWidget(m_useAsDefault); connect(m_viewMode, SIGNAL(activated(int)), this, SLOT(slotViewModeChanged(int))); @@ -124,6 +128,8 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : connect(m_showHiddenFiles, SIGNAL(clicked()), this, SLOT(slotShowHiddenFilesChanged())); + connect(m_applyToSubFolders, SIGNAL(clicked()), + this, SLOT(markAsDirty())); connect(m_applyToSubFolders, SIGNAL(clicked()), this, SLOT(markAsDirty())); @@ -215,6 +221,8 @@ void ViewPropertiesDialog::applyViewProperties() m_viewProps->save(); m_dolphinView->setViewProperties(*m_viewProps); m_isDirty = false; + + // TODO: handle m_useAsDefault setting } #include "viewpropertiesdialog.moc" -- cgit v1.3