#include "filterbar/filterbar.h"
#include "search/dolphinsearchbox.h"
#include "statusbar/dolphinstatusbar.h"
-#include "views/dolphinplacesmodel.h"
#include "views/draganddrophelper.h"
#include "views/viewmodecontroller.h"
#include "views/viewproperties.h"
m_topLayout->setSpacing(0);
m_topLayout->setMargin(0);
- m_urlNavigator = new KUrlNavigator(DolphinPlacesModel::instance(), url, this);
+ m_urlNavigator = new KUrlNavigator(new KFilePlacesModel(this), url, this);
connect(m_urlNavigator, SIGNAL(urlsDropped(KUrl,QDropEvent*)),
this, SLOT(dropUrls(KUrl,QDropEvent*)));
connect(m_urlNavigator, SIGNAL(activated()),
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);
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();
}
}
-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);
}
}