Make buttons in seach bar nicer (icon, tooltip, autoselect)

Authored by bruns on Apr 7 2019, 3:21 PM.

Description

Make buttons in seach bar nicer (icon, tooltip, autoselect)

Summary:
The "Everywhere" button actually selects the home directory, so use
an appropriate label ("Your files") and add a "user-home" icon.

Pre-select the right button when entering search, depending on the
location where the "Find ..." action was triggered.

Add tooltips for both buttons, stating where to look for files. Most
importantly, this includes the full path for "From here".

Canonicalize the path correctly (always strip trailing slash), otherwise
QUrl::fileName() will be an empty string, resulting in "From Here (/)"

Do not hide the buttons in case the url is non-local, as it is confusing:

  1. The state depends on the previous search. When the user hits "Find" when browsing e.g an SMB share, the search was probably in the home dir.
  2. The current search location was hidden
  3. The user may want to do a local search, give the option to do so.

Reviewers: Dolphin, ngraham, elvisangelaccio

Reviewed By: Dolphin, ngraham, elvisangelaccio

Subscribers: loh.tar, meven, elvisangelaccio, kfm-devel

Tags: Dolphin

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

Details

Committed
brunsApr 9 2019, 9:18 PM
Reviewer
Dolphin
Differential Revision
D20357: Make buttons in seach bar nicer (icon, tooltip, autoselect)
Parents
R318:93f26f799fe7: Merge branch 'Applications/19.04'
Branches
Unknown
Tags
Unknown