mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
Display readable titlebar text while using search and full paths in titlebar
Summary: BUG: 406624 FIXED-IN: 20.08 Reviewers: #vdg, #dolphin, iasensio, elvisangelaccio, ngraham, meven Reviewed By: #vdg, #dolphin, ngraham, meven Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28815
This commit is contained in:
parent
514d9c8fc9
commit
8de24d5802
|
@ -451,6 +451,14 @@ void DolphinViewContainer::reload()
|
|||
|
||||
QString DolphinViewContainer::caption() const
|
||||
{
|
||||
if (isSearchModeEnabled()) {
|
||||
if (currentSearchText().isEmpty()){
|
||||
return i18n("Search");
|
||||
} else {
|
||||
return i18n("Search for %1", currentSearchText());
|
||||
}
|
||||
}
|
||||
|
||||
if (GeneralSettings::showFullPathInTitlebar()) {
|
||||
if (!url().isLocalFile()) {
|
||||
return url().adjusted(QUrl::StripTrailingSlash).toString();
|
||||
|
@ -465,13 +473,6 @@ QString DolphinViewContainer::caption() const
|
|||
return placesModel->text(matchedPlaces.first());
|
||||
}
|
||||
|
||||
if (isSearchModeEnabled()) {
|
||||
if (currentSearchText().isEmpty()){
|
||||
return i18n("Search");
|
||||
} else {
|
||||
return i18n("Search for %1", currentSearchText());
|
||||
}
|
||||
}
|
||||
|
||||
if (!url().isLocalFile()) {
|
||||
QUrl adjustedUrl = url().adjusted(QUrl::StripTrailingSlash);
|
||||
|
|
Loading…
Reference in a new issue