Index: src/dolphinmainwindow.cpp =================================================================== --- src/dolphinmainwindow.cpp +++ src/dolphinmainwindow.cpp @@ -1001,6 +1001,17 @@ fileName = '/'; } + if(m_activeViewContainer->view()->viewPropertiesContext() == "search"){ + schemePrefix = i18n("Search for "); + if(m_activeViewContainer->currentFacet() != ""){ + schemePrefix += m_activeViewContainer->currentFacet().toLower() + "s"; + if(m_activeViewContainer->currentSearchText() != ""){ + schemePrefix += i18n(" named "); + } + } + fileName = m_activeViewContainer->currentSearchText(); + } + setWindowTitle(schemePrefix + fileName); } Index: src/dolphinviewcontainer.h =================================================================== --- src/dolphinviewcontainer.h +++ src/dolphinviewcontainer.h @@ -93,6 +93,10 @@ void setAutoGrabFocus(bool grab); bool autoGrabFocus() const; + QString currentSearchText() const; + + QString currentFacet() const; + const DolphinStatusBar* statusBar() const; DolphinStatusBar* statusBar(); Index: src/dolphinviewcontainer.cpp =================================================================== --- src/dolphinviewcontainer.cpp +++ src/dolphinviewcontainer.cpp @@ -245,6 +245,16 @@ return m_autoGrabFocus; } +QString DolphinViewContainer::currentSearchText() const +{ + return m_searchBox->text(); +} + +QString DolphinViewContainer::currentFacet() const +{ + return m_searchBox->getFacet(); +} + const DolphinStatusBar* DolphinViewContainer::statusBar() const { return m_statusBar; Index: src/search/dolphinsearchbox.h =================================================================== --- src/search/dolphinsearchbox.h +++ src/search/dolphinsearchbox.h @@ -98,6 +98,11 @@ */ bool isActive() const; + /** + * Returns the current active facet (used for the window title) + */ + QString getFacet() const; + protected: virtual bool event(QEvent* event) Q_DECL_OVERRIDE; virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE; Index: src/search/dolphinsearchbox.cpp =================================================================== --- src/search/dolphinsearchbox.cpp +++ src/search/dolphinsearchbox.cpp @@ -569,3 +569,7 @@ m_facetsToggleButton->setText(facetsIsVisible ? i18nc("action:button", "Fewer Options") : i18nc("action:button", "More Options")); } +QString DolphinSearchBox::getFacet() const +{ + return m_facetsWidget->facetType(); +}