From 475f8b1261a6ea106ca9dd90b625ea95fe63a4c7 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 9 Mar 2012 16:12:00 +0100 Subject: Details view: Allow to turn off expandable folders like in Dolphin 1.7 The option for turning off expandable folders has been removed with the new view-engine. Due to several requests this option has been readded again. As for 4.8.x no new user-interface strings may be introduced, the line ExpandableFolders=false must be manually added below the section "[DetailsMode]" in the file ~/.kde/share/config/dolphinrc if the expandable-folders feature should be disabled. Thanks to H.H. "cyberbeat" for the initial patch! BUG: 289090 FIXED-IN: 4.8.2 --- src/kitemviews/kitemlistview.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/kitemviews/kitemlistview.cpp') diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index a54e06ddc..f1822826d 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -524,6 +524,15 @@ QHash KItemListView::visibleRolesSizes(const KItemRangeList& return QHash(); } +void KItemListView::setSupportsItemExpanding(bool supportsExpanding) +{ + if (m_supportsItemExpanding != supportsExpanding) { + m_supportsItemExpanding = supportsExpanding; + updateSiblingsInformation(); + onSupportsItemExpandingChanged(supportsExpanding); + } +} + bool KItemListView::supportsItemExpanding() const { return m_supportsItemExpanding; @@ -725,6 +734,11 @@ void KItemListView::onStyleOptionChanged(const KItemListStyleOption& current, co Q_UNUSED(previous); } +void KItemListView::onSupportsItemExpandingChanged(bool supportsExpanding) +{ + Q_UNUSED(supportsExpanding); +} + void KItemListView::onTransactionBegin() { } @@ -792,14 +806,6 @@ QList KItemListView::visibleItemListWidgets() const return m_visibleItems.values(); } -void KItemListView::setSupportsItemExpanding(bool supportsExpanding) -{ - if (m_supportsItemExpanding != supportsExpanding) { - m_supportsItemExpanding = supportsExpanding; - updateSiblingsInformation(); - } -} - void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges) { updateVisibleRolesSizes(itemRanges); -- cgit v1.3