]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
First version of a unit test for KItemListController
[dolphin.git] / src / dolphinviewcontainer.cpp
index df5fe6b15f06c0a0c139afefa06bab4ea1947b91..9809fbaf5def5c5b1e3adee504780b7133ead151 100644 (file)
@@ -211,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
@@ -219,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
@@ -373,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()) {
@@ -533,8 +539,7 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url)
 
 void DolphinViewContainer::dropUrls(const KUrl& destination, QDropEvent* event)
 {
-    const KFileItem destItem(KFileItem::Unknown, KFileItem::Unknown, destination);
-    DragAndDropHelper::dropUrls(destItem, event);
+    DragAndDropHelper::dropUrls(KFileItem(), destination, event);
 }
 
 void DolphinViewContainer::redirect(const KUrl& oldUrl, const KUrl& newUrl)