Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 702429ac authored by Julian Schraner's avatar Julian Schraner Committed by Nathaniel Graham

Change window title when searching

When you search for a file (e.g. "hello world") the window title of Dolphin will now change to "Search for [input]" instead of "baloosearch - /".

BUG: 321575

Test Plan:
  - Disables it iself after search bar is hidden
  - Works with multiple word searches

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham, elvisangelaccio

Subscribers: anthonyfieroni, elvisangelaccio, rkflx, emmanuelp, ngraham, #dolphin

Tags: #dolphin

Differential Revision:
parent d0277c71
......@@ -1001,6 +1001,16 @@ void DolphinMainWindow::setUrlAsCaption(const QUrl& url)
fileName = '/';
if (m_activeViewContainer->isSearchModeEnabled()) {
setWindowTitle(i18n("Empty Search"));
} else {
const auto searchText = i18n("Search for %1", m_activeViewContainer->currentSearchText());
setWindowTitle(schemePrefix + fileName);
......@@ -245,6 +245,11 @@ bool DolphinViewContainer::autoGrabFocus() const
return m_autoGrabFocus;
QString DolphinViewContainer::currentSearchText() const
return m_searchBox->text();
const DolphinStatusBar* DolphinViewContainer::statusBar() const
return m_statusBar;
......@@ -93,6 +93,8 @@ public:
void setAutoGrabFocus(bool grab);
bool autoGrabFocus() const;
QString currentSearchText() const;
const DolphinStatusBar* statusBar() const;
DolphinStatusBar* statusBar();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment