┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dolphinmainwindow.cpp4
-rw-r--r--src/dolphinmainwindow.h5
-rw-r--r--src/panels/panel.cpp5
-rw-r--r--src/panels/panel.h5
-rw-r--r--src/panels/places/placespanel.cpp13
-rw-r--r--src/panels/places/placespanel.h3
6 files changed, 35 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index d83c9de03..3bf3b3f55 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -1763,6 +1763,8 @@ void DolphinMainWindow::setupDockWidgets()
placesPanel, SLOT(setUrl(KUrl)));
connect(placesDock, SIGNAL(visibilityChanged(bool)),
this, SLOT(slotPlacesPanelVisibilityChanged(bool)));
+ connect(this, SIGNAL(settingsChanged()),
+ placesPanel, SLOT(readSettings()));
// Add actions into the "Panels" menu
KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this);
@@ -1953,6 +1955,8 @@ void DolphinMainWindow::refreshViews()
toggleSplitView();
}
}
+
+ emit settingsChanged();
}
void DolphinMainWindow::clearStatusBar()
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index ab79fb0e6..7da5801ff 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -151,6 +151,11 @@ signals:
*/
void requestItemInfo(const KFileItem& item);
+ /**
+ * Is emitted if the settings have been changed.
+ */
+ void settingsChanged();
+
protected:
/** @see QWidget::showEvent() */
virtual void showEvent(QShowEvent* event);
diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp
index c2681ecfb..14b7c0230 100644
--- a/src/panels/panel.cpp
+++ b/src/panels/panel.cpp
@@ -71,4 +71,9 @@ void Panel::setUrl(const KUrl& url)
}
}
+void Panel::readSettings()
+{
+
+}
+
#include "panel.moc"
diff --git a/src/panels/panel.h b/src/panels/panel.h
index 064e1f362..a0b25d6cc 100644
--- a/src/panels/panel.h
+++ b/src/panels/panel.h
@@ -60,6 +60,11 @@ public slots:
*/
void setUrl(const KUrl& url);
+ /**
+ * Refreshes the view to get synchronized with the settings.
+ */
+ virtual void readSettings();
+
protected:
/**
* Must be implemented by derived classes and is invoked when
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);