Bug 318580

Summary: Hide facetsWidget if indexing is turned off and/or folder is not indexed
Product: [Applications] dolphin Reporter: Kai Uwe Broulik <kde>
Component: panels: searchAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bugseforuns, mail, nate
Priority: NOR    
Version: 2.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 19.11.80
Sentry Crash Report:
Attachments: Small untested patch

Description Kai Uwe Broulik 2013-04-19 09:04:02 UTC
I usually have the facetsWidget visible for easy filtering of results. When searching through a non-indexed location such as a remote directory the widget stays there although it is of no use because the options are disabled. The widget should not be expanded by default then.

Reproducible: Always

Steps to Reproduce:
1. Go to a non-indexed location
2. Ctrl+F
3. 
Actual Results:  
The facets widget is expanded if it has been earlier

Expected Results:  
The facets widget is not expanded by default even if it has been earlier, the settings are untouched. If the user searches in an indexed location again, it appears again.
Comment 1 Kai Uwe Broulik 2013-04-19 09:05:26 UTC
Created attachment 79019 [details]
Small untested patch

Not sure if it will work or is the right approach, but looked reasonable to me ;)
Not sure if we should hide the toggle button altogether, there might be additional options there some day or so?
Comment 2 Nate Graham 2017-09-03 02:29:07 UTC
Is this still relevant?
Comment 3 Julian Steinmann 2018-04-11 17:48:22 UTC
This is theoretically still relevant, as the panel is still expanded even though all options are disabled. I'll set the status to CONFIRMED, maybe @broulik could dust off his old patch & submit it for review?
Comment 4 Kai Uwe Broulik 2018-04-12 11:17:35 UTC
Yeah I think the patch would still make sense
Comment 5 Elvis Angelaccio 2019-10-13 15:25:43 UTC
Git commit c144701c28aa02a1fd9e1a24460ae9e5178ed069 by Elvis Angelaccio, on behalf of Ismael Asensio.
Committed on 13/10/2019 at 15:22.
Pushed by elvisangelaccio into branch 'master'.

Hide search extra options when not available

Summary:
Hide the search extra options when they are not available, because the current location is not indexed or Baloo is not enabled.
The button is disabled and shows a tooltip to provide feedback of why it's not available.
Depends on D24478

{F7531893}
Related: bug 408680, bug 396898
FIXED-IN: 19.11.80

Test Plan:
 - `Ctrl-F` on a non-indexed location
 - `balooctl disable` and `Ctrl-F` on an indexed location

On both cases the extra options are not shown, the button is disabled and the reason is shown in the tooltip
The user selection is remembered between indexed locations.

Reviewers: #dolphin, elvisangelaccio, meven, ngraham

Reviewed By: meven

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D24446

M  +43   -12   src/search/dolphinsearchbox.cpp
M  +1    -0    src/search/dolphinsearchbox.h

https://commits.kde.org/dolphin/c144701c28aa02a1fd9e1a24460ae9e5178ed069