From f6c7b90edf05a52fba6e2a06caa0247e909b43e8 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 26 Jan 2008 21:45:28 +0000 Subject: Blend in a toggle button when hovering items. This allows selecting items without using the rubberband or Ctrl/Shift-keys in the single-click mode. Any feedback from users is highly welcome (I think people will either love or hate this feature, I'm really not sure -> it can be turned off too). svn path=/trunk/KDE/kdebase/apps/; revision=766901 --- src/dolphindetailsview.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/dolphindetailsview.cpp') diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index c5852fa68..09645a489 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -25,9 +25,11 @@ #include "dolphinsettings.h" #include "dolphinsortfilterproxymodel.h" #include "draganddrophelper.h" +#include "selectionmanager.h" #include "viewproperties.h" #include "dolphin_detailsmodesettings.h" +#include "dolphin_generalsettings.h" #include #include @@ -94,6 +96,11 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr if (KGlobalSettings::singleClick()) { connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(triggerItem(const QModelIndex&))); + if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { + SelectionManager* selManager = new SelectionManager(this); + connect(selManager, SIGNAL(selectionChanged()), + this, SLOT(requestActivation())); + } } else { connect(this, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(triggerItem(const QModelIndex&))); @@ -508,6 +515,11 @@ void DolphinDetailsView::disableAutoResizing() m_autoResize = false; } +void DolphinDetailsView::requestActivation() +{ + m_controller->requestActivation(); +} + bool DolphinDetailsView::isZoomInPossible() const { DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); -- cgit v1.3