]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.cpp
Implement dropping of items into the Places Panel
[dolphin.git] / src / dolphinviewcontainer.cpp
index 5f8b8f3b4504cfeddc50cddbd057a3f499a30923..9e297364b844c16de36635ab6d8ae6565f4b262a 100644 (file)
@@ -90,7 +90,7 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
     m_searchBox = new DolphinSearchBox(this);
     m_searchBox->hide();
     connect(m_searchBox, SIGNAL(closeRequest()), this, SLOT(closeSearchBox()));
-    connect(m_searchBox, SIGNAL(search(QString)), this, SLOT(startSearching(QString)));
+    connect(m_searchBox, SIGNAL(searchRequest()), this, SLOT(startSearching()));
     connect(m_searchBox, SIGNAL(returnPressed(QString)), this, SLOT(requestFocus()));
 
     m_messageWidget = new KMessageWidget(this);
@@ -297,6 +297,8 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled)
             m_searchBox->setSearchPath(url);
         }
     } else {
+        m_view->setViewPropertiesContext(QString());
+
         // Restore the URL for the URL navigator. If Dolphin has been
         // started with a search-URL, the home URL is used as fallback.
         const KUrl url = m_searchBox->searchPath();
@@ -585,11 +587,11 @@ void DolphinViewContainer::slotHistoryChanged()
     }
 }
 
-void DolphinViewContainer::startSearching(const QString &text)
+void DolphinViewContainer::startSearching()
 {
-    Q_UNUSED(text);
     const KUrl url = m_searchBox->urlForSearching();
     if (url.isValid() && !url.isEmpty()) {
+        m_view->setViewPropertiesContext("search");
         m_urlNavigator->setLocationUrl(url);
     }
 }