diff options
| author | Peter Penz <[email protected]> | 2008-01-26 21:45:28 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-01-26 21:45:28 +0000 |
| commit | f6c7b90edf05a52fba6e2a06caa0247e909b43e8 (patch) | |
| tree | cda08606cd172d460d404f7f822b528985fa8e03 /src/dolphindetailsview.cpp | |
| parent | 453131d6e8a59af87e943455e26074ce8e3ddae3 (diff) | |
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
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <kdirmodel.h> #include <klocale.h> @@ -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(); |
