┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2012-09-11 20:09:01 +0200
committerEmmanuel Pescosta <[email protected]>2012-09-11 20:09:01 +0200
commite280e7f68c021bfbd7be0689721f7aa1f955aa92 (patch)
treecd8b43e8801332e57cbcc97e402705780d20a73e /src/panels/places
parenteb54d5b3481e68f45ba93b0224b3d83930a58f88 (diff)
Fixes Bug 242007 - "Open Folder during Drag operation" cannot go into different partition using "Places Panel"
BUG: 242007 REVIEW: 106380
Diffstat (limited to 'src/panels/places')
-rw-r--r--src/panels/places/placespanel.cpp13
-rw-r--r--src/panels/places/placespanel.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index d4450888e..ccc10d205 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -23,6 +23,8 @@
#include "placespanel.h"
+#include "dolphin_generalsettings.h"
+
#include <KDebug>
#include <KDirNotify>
#include <KIcon>
@@ -75,6 +77,14 @@ bool PlacesPanel::urlChanged()
return true;
}
+void PlacesPanel::readSettings()
+{
+ if (m_controller) {
+ const int delay = GeneralSettings::autoExpandFolders() ? 750 : -1;
+ m_controller->setAutoActivationDelay(delay);
+ }
+}
+
void PlacesPanel::showEvent(QShowEvent* event)
{
if (event->spontaneous()) {
@@ -98,6 +108,9 @@ void PlacesPanel::showEvent(QShowEvent* event)
m_controller = new KItemListController(m_model, view, this);
m_controller->setSelectionBehavior(KItemListController::SingleSelection);
m_controller->setSingleClickActivation(true);
+
+ readSettings();
+
connect(m_controller, SIGNAL(itemActivated(int)), this, SLOT(slotItemActivated(int)));
connect(m_controller, SIGNAL(itemMiddleClicked(int)), this, SLOT(slotItemMiddleClicked(int)));
connect(m_controller, SIGNAL(itemContextMenuRequested(int,QPointF)), this, SLOT(slotItemContextMenuRequested(int,QPointF)));
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h
index 8a84e00a0..52fa153bc 100644
--- a/src/panels/places/placespanel.h
+++ b/src/panels/places/placespanel.h
@@ -50,6 +50,9 @@ protected:
virtual bool urlChanged();
virtual void showEvent(QShowEvent* event);
+public slots:
+ virtual void readSettings();
+
private slots:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);