┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-01-26 21:45:28 +0000
committerPeter Penz <[email protected]>2008-01-26 21:45:28 +0000
commitf6c7b90edf05a52fba6e2a06caa0247e909b43e8 (patch)
treecda08606cd172d460d404f7f822b528985fa8e03 /src/dolphiniconsview.cpp
parent453131d6e8a59af87e943455e26074ce8e3ddae3 (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/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index c867ce611..18d4accec 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -23,7 +23,9 @@
#include "dolphincontroller.h"
#include "dolphinsettings.h"
#include "dolphin_iconsmodesettings.h"
+#include "dolphin_generalsettings.h"
#include "draganddrophelper.h"
+#include "selectionmanager.h"
#include <kcategorizedsortfilterproxymodel.h>
#include <kdialog.h>
@@ -65,6 +67,11 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
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&)));
@@ -389,6 +396,11 @@ void DolphinIconsView::zoomOut()
}
}
+void DolphinIconsView::requestActivation()
+{
+ m_controller->requestActivation();
+}
+
bool DolphinIconsView::isZoomInPossible() const
{
IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();