#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->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();
return m_searchBox->isVisible();
}
+QString DolphinViewContainer::placesText() const
+{
+ QString text;
+
+ if (isSearchModeEnabled()) {
+ text = m_searchBox->searchPath().fileName() + QLatin1String(": ") + m_searchBox->text();
+ } else {
+ text = url().fileName();
+ if (text.isEmpty()) {
+ text = url().host();
+ }
+ }
+
+ return text;
+}
+
void DolphinViewContainer::setUrl(const KUrl& newUrl)
{
if (newUrl != m_urlNavigator->locationUrl()) {
{
const KUrl url = m_searchBox->urlForSearching();
if (url.isValid() && !url.isEmpty()) {
+ m_view->setViewPropertiesContext("search");
m_urlNavigator->setLocationUrl(url);
}
}