]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
SVN_SILENT made messages (.desktop file)
[dolphin.git] / src / dolphinviewcontainer.cpp
index c8d495db192499f968ab92d5d81e6df3116709ed..28bf5250c459510520d32b2f2e11ab53f727f880 100644 (file)
@@ -49,6 +49,7 @@
 #include "search/dolphinsearchbox.h"
 #include "statusbar/dolphinstatusbar.h"
 #include "views/dolphinplacesmodel.h"
+#include "views/draganddrophelper.h"
 #include "views/viewmodecontroller.h"
 #include "views/viewproperties.h"
 
@@ -210,7 +211,7 @@ DolphinSearchBox* DolphinViewContainer::searchBox()
     return m_searchBox;
 }
 
-void DolphinViewContainer::refresh()
+void DolphinViewContainer::readSettings()
 {
     if (GeneralSettings::modifiedStartupSettings()) {
         // The startup settings should only get applied if they have been
@@ -218,11 +219,12 @@ void DolphinViewContainer::refresh()
         // settings of the URL navigator and the filterbar.
         m_urlNavigator->setUrlEditable(GeneralSettings::editableUrl());
         m_urlNavigator->setShowFullPath(GeneralSettings::showFullPath());
+        m_urlNavigator->setHomeUrl(KUrl(GeneralSettings::homeUrl()));
         setFilterBarVisible(GeneralSettings::filterBar());
     }
 
-    m_view->refresh();
-    m_statusBar->refresh();
+    m_view->readSettings();
+    m_statusBar->readSettings();
 }
 
 bool DolphinViewContainer::isFilterBarVisible() const
@@ -372,6 +374,11 @@ void DolphinViewContainer::slotFinishedPathLoading()
 
 void DolphinViewContainer::slotItemActivated(const KFileItem& item)
 {
+    // It is possible to activate items on inactive views by
+    // drag & drop operations. Assure that activating an item always
+    // results in an active view.
+    m_view->setActive(true);
+
     KUrl url = item.targetUrl();
 
     if (item.isDir()) {
@@ -423,12 +430,7 @@ void DolphinViewContainer::showItemInfo(const KFileItem& item)
             m_statusBar->clear();
         }
     } else {
-        QString message;
-        if (item.isDir()) {
-            message = item.text();
-        } else {
-            message = i18nc("@info:status filename (type)", "%1 (%2)", item.text(), item.mimeComment());
-        }
+        const QString message = item.isDir() ? item.text() : item.getStatusBarInfo();
         m_statusBar->setMessage(message, DolphinStatusBar::Default);
     }
 }
@@ -532,9 +534,7 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url)
 
 void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event)
 {
-    Q_UNUSED(destination);
-    Q_UNUSED(event);
-    //DragAndDropHelper::instance().dropUrls(KFileItem(), destination, event, this);
+    DragAndDropHelper::dropUrls(KFileItem(), destination, event);
 }
 
 void DolphinViewContainer::redirect(const KUrl& oldUrl, const KUrl& newUrl)