From 7045a25e3abaedab0d128f03702eaf48ffe6e0b7 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 2 Feb 2011 19:36:08 +0100 Subject: 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 --- src/dolphinmainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/dolphinmainwindow.cpp') 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("filterDock"); - if ((filterDock == 0) || !filterDock->isEnabled()) { + if (filterDock == 0) { return; } -- cgit v1.3