]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixes Bug 242007 - "Open Folder during Drag operation" cannot go into different parti...
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Tue, 11 Sep 2012 18:09:01 +0000 (20:09 +0200)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Tue, 11 Sep 2012 18:09:01 +0000 (20:09 +0200)
BUG: 242007
REVIEW: 106380

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h
src/panels/panel.cpp
src/panels/panel.h
src/panels/places/placespanel.cpp
src/panels/places/placespanel.h

index d83c9de031e8f85509cac233cd01892e80990f40..3bf3b3f558c72ce4965505c31e5e0457017c9c36 100644 (file)
@@ -1763,6 +1763,8 @@ void DolphinMainWindow::setupDockWidgets()
             placesPanel, SLOT(setUrl(KUrl)));
     connect(placesDock, SIGNAL(visibilityChanged(bool)),
             this, SLOT(slotPlacesPanelVisibilityChanged(bool)));
             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);
 
     // Add actions into the "Panels" menu
     KActionMenu* panelsMenu = new KActionMenu(i18nc("@action:inmenu View", "Panels"), this);
@@ -1953,6 +1955,8 @@ void DolphinMainWindow::refreshViews()
             toggleSplitView();
         }
     }
             toggleSplitView();
         }
     }
+
+    emit settingsChanged();
 }
 
 void DolphinMainWindow::clearStatusBar()
 }
 
 void DolphinMainWindow::clearStatusBar()
index ab79fb0e6ebe6f59791168071ed2c30990c88434..7da5801ffe5f3603b29674cf2f0686dccb38b190 100644 (file)
@@ -151,6 +151,11 @@ signals:
      */
     void requestItemInfo(const KFileItem& item);
 
      */
     void requestItemInfo(const KFileItem& item);
 
+    /**
+     * Is emitted if the settings have been changed.
+     */
+    void settingsChanged();
+
 protected:
     /** @see QWidget::showEvent() */
     virtual void showEvent(QShowEvent* event);
 protected:
     /** @see QWidget::showEvent() */
     virtual void showEvent(QShowEvent* event);
index c2681ecfbd2ffcc3d3e1d0c563e79c89561369ad..14b7c0230b5f4b39f743b5f3b6ae47683df7f100 100644 (file)
@@ -71,4 +71,9 @@ void Panel::setUrl(const KUrl& url)
     }
 }
 
     }
 }
 
+void Panel::readSettings()
+{
+
+}
+
 #include "panel.moc"
 #include "panel.moc"
index 064e1f3624c8076f304e86f6e2642056f0d97f6a..a0b25d6cc266aeef32ea8de77bbabfa2240f510b 100644 (file)
@@ -60,6 +60,11 @@ public slots:
      */
     void setUrl(const KUrl& url);
 
      */
     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
 protected:
     /**
      * Must be implemented by derived classes and is invoked when
index d4450888e076485fdf58640f3b6c48e691eb8ef8..ccc10d205338bdf8e9d73274353957ff5110aecc 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "placespanel.h"
 
 
 #include "placespanel.h"
 
+#include "dolphin_generalsettings.h"
+
 #include <KDebug>
 #include <KDirNotify>
 #include <KIcon>
 #include <KDebug>
 #include <KDirNotify>
 #include <KIcon>
@@ -75,6 +77,14 @@ bool PlacesPanel::urlChanged()
     return true;
 }
 
     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()) {
 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);
         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)));
         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)));
index 8a84e00a0baeb012f974bcca66ca7e7f9b5cea69..52fa153bc233e47b9c52f6b542a8caa694f7d2b1 100644 (file)
@@ -50,6 +50,9 @@ protected:
     virtual bool urlChanged();
     virtual void showEvent(QShowEvent* event);
 
     virtual bool urlChanged();
     virtual void showEvent(QShowEvent* event);
 
+public slots:
+    virtual void readSettings();
+
 private slots:
     void slotItemActivated(int index);
     void slotItemMiddleClicked(int index);
 private slots:
     void slotItemActivated(int index);
     void slotItemMiddleClicked(int index);