┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-12-04 20:56:42 +0000
committerPeter Penz <[email protected]>2007-12-04 20:56:42 +0000
commit569033022089a8e2a025b4899df9051172dd36c7 (patch)
tree435367003d2563950fe6903ce04d4841bb0f9f03 /src/dolphiniconsview.cpp
parent7cdaa3f5bff507812e3e68f14c52aa0782887886 (diff)
Allow turning off the feature that additional information might be shown in the icons view. Per default the setting is still on, but for people who prefer browsing with the details view and only temporary switch to the icons view (e. g. for having a larger preview), this feature gets a showstopper (discussed with Eike Hein).
Got the OK from the translator team for adding the new string. CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=744901
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 61179a3ac..2bb21cb79 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -282,12 +282,16 @@ void DolphinIconsView::slotEntered(const QModelIndex& index)
void DolphinIconsView::slotShowPreviewChanged()
{
const DolphinView* view = m_controller->dolphinView();
- const int infoCount = view->additionalInfo().count();
- updateGridSize(view->showPreview(), infoCount);
+ updateGridSize(view->showPreview(), additionalInfoCount());
}
void DolphinIconsView::slotAdditionalInfoChanged(const KFileItemDelegate::InformationList& info)
{
+ const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
+ if (!settings->showAdditionalInfo()) {
+ return;
+ }
+
const bool showPreview = m_controller->dolphinView()->showPreview();
updateGridSize(showPreview, info.count());
}
@@ -318,8 +322,7 @@ void DolphinIconsView::zoomIn()
settings->setItemWidth(settings->itemWidth() + diff);
settings->setItemHeight(settings->itemHeight() + diff);
- const int infoCount = m_controller->dolphinView()->additionalInfo().count();
- updateGridSize(showPreview, infoCount);
+ updateGridSize(showPreview, additionalInfoCount());
}
}
@@ -350,8 +353,7 @@ void DolphinIconsView::zoomOut()
settings->setItemWidth(settings->itemWidth() - diff);
settings->setItemHeight(settings->itemHeight() - diff);
- const int infoCount = m_controller->dolphinView()->additionalInfo().count();
- updateGridSize(showPreview, infoCount);
+ updateGridSize(showPreview, additionalInfoCount());
}
}
@@ -447,4 +449,11 @@ KFileItem DolphinIconsView::itemForIndex(const QModelIndex& index) const
return dirModel->itemForIndex(dirIndex);
}
+int DolphinIconsView::additionalInfoCount() const
+{
+ const DolphinView* view = m_controller->dolphinView();
+ const IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();
+ return settings->showAdditionalInfo() ? view->additionalInfo().count() : 0;
+}
+
#include "dolphiniconsview.moc"