diff options
| author | Peter Penz <[email protected]> | 2011-02-02 19:36:08 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-02-02 19:36:08 +0100 |
| commit | 7045a25e3abaedab0d128f03702eaf48ffe6e0b7 (patch) | |
| tree | 66a3deaa0c15c353895f5d42301bd27b2241f7b5 /src/dolphinmainwindow.cpp | |
| parent | 28f00f36d74572510aee58111f1a9f884e148f6b (diff) | |
Fix visibility- and enabled-issues for the filter-panel
The filter-panel should be disabled if the current folder is not indexed at all. Also when triggering a "Find" the filter-panel should stay invisible per default when the current folder is not indexed.
CCBUG: 264969
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index cd1810d37..1c4a45bda 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -36,6 +36,7 @@ #include "panels/folders/folderspanel.h" #include "panels/places/placespanel.h" #include "panels/information/informationpanel.h" +#include "search/dolphinsearchinformation.h" #include "settings/dolphinsettings.h" #include "settings/dolphinsettingsdialog.h" #include "statusbar/dolphinstatusbar.h" @@ -1220,13 +1221,14 @@ void DolphinMainWindow::slotWriteStateChanged(bool isFolderWritable) void DolphinMainWindow::slotSearchModeChanged(bool enabled) { #ifdef HAVE_NEPOMUK - if (Nepomuk::ResourceManager::instance()->init() != 0) { - // Currently the Filter Panel only works with Nepomuk enabled + const KUrl url = m_activeViewContainer->url(); + const DolphinSearchInformation& searchInfo = DolphinSearchInformation::instance(); + if (!searchInfo.isIndexingEnabled() || !searchInfo.isPathIndexed(url)) { return; } QDockWidget* filterDock = findChild<QDockWidget*>("filterDock"); - if ((filterDock == 0) || !filterDock->isEnabled()) { + if (filterDock == 0) { return; } |
