From ae488b13186a4cb5d0bc5d7f23b07467d6638979 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 20 Apr 2011 20:03:51 +0200 Subject: Improve usability of Search Panel If the Search Panel is shown outside the context of the "Find" mode it will be always enabled and does a global search. Only if the user is in the "Find" mode and the searching is restricted to the current directory the Search Panel might get disabled if the current directory is not indexed. This solves the major usability issue that it was not clear for the users whether a global or restricted search is done. --- src/panels/search/searchpanel.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/panels/search/searchpanel.h') diff --git a/src/panels/search/searchpanel.h b/src/panels/search/searchpanel.h index 700cfc84a..b92b692aa 100644 --- a/src/panels/search/searchpanel.h +++ b/src/panels/search/searchpanel.h @@ -79,6 +79,16 @@ private slots: private: void setQuery(const Nepomuk::Query::Query& query); + /** + * @return True if the facets can be applied to the given URL + * and hence a filtering of the content is possible. + * False is returned if the search-mode is set to + * SearchMode::FromCurrentDir and this directory is + * not indexed at all. Also if indexing is disabled + * false will be returned. + */ + bool isFilteringPossible() const; + private: bool m_initialized; SearchMode m_searchMode; -- cgit v1.3.1