diff options
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index f9c9bf0df..482a5b7e8 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -51,6 +51,7 @@ #include "dolphin_generalsettings.h" #include "dolphin_iconsmodesettings.h" +#include "dolphin_searchsettings.h" #include <KAction> #include <KActionCollection> @@ -1247,6 +1248,20 @@ void DolphinMainWindow::slotSearchModeChanged(bool enabled) } m_searchDockIsTemporaryVisible = false; } + + SearchPanel* searchPanel = qobject_cast<SearchPanel*>(searchDock->widget()); + if (searchPanel) { + // Per default any search-operation triggered by the Search Panel is done + // "Everywhere". + SearchPanel::SearchMode searchMode = SearchPanel::Everywhere; + + if (enabled && (SearchSettings::location() == QLatin1String("FromHere"))) { + // Only if the search-mode is enabled it is visible for the user whether + // a searching is done "Everywhere" or "From Here" (= current directory). + searchMode = SearchPanel::FromCurrentDir; + } + searchPanel->setSearchMode(searchMode); + } #else Q_UNUSED(enabled); #endif |
