]> cloud.milkyroute.net Git - dolphin.git/commit
Make buttons in seach bar nicer (icon, tooltip, autoselect)
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 7 Apr 2019 15:21:17 +0000 (17:21 +0200)
committerStefan Brüns <stefan.bruens@rwth-aachen.de>
Tue, 9 Apr 2019 21:18:50 +0000 (23:18 +0200)
commit9ce757b3d37fd99381d86ecf380a2d0f1b4f7905
treed1640511d14722462127b76e056e07783d50e68a
parent93f26f799fe78077a5815aeae8dca9f097040eb6
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
src/search/dolphinsearchbox.cpp