diff options
| author | John Salatas <[email protected]> | 2017-01-14 04:26:14 -0800 |
|---|---|---|
| committer | John Salatas <[email protected]> | 2017-01-14 04:26:14 -0800 |
| commit | 63a591f32a56cb4caac9a616d21fab0f37c8d827 (patch) | |
| tree | 28062a54a6d58db654c983467a99211d900daecf /src/dolphinmainwindow.cpp | |
| parent | 97415005de040885cb63ea01fdb879e20226a2f2 (diff) | |
Show full path in title bar
BUG: 229810
Differential Revision: https://phabricator.kde.org/D4078
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e5103fd42..deb5d5e57 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -961,13 +961,17 @@ void DolphinMainWindow::setUrlAsCaption(const QUrl& url) } } - QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName(); - if (fileName.isEmpty()) { - fileName = '/'; + if (GeneralSettings::showFullPathInTitlebar()) { + const QString path = url.adjusted(QUrl::StripTrailingSlash).path(); + caption.append(path); + } else { + QString fileName = url.adjusted(QUrl::StripTrailingSlash).fileName(); + if (fileName.isEmpty()) { + fileName = '/'; + } + caption.append(fileName); } - caption.append(fileName); - setWindowTitle(caption); } @@ -1404,6 +1408,7 @@ void DolphinMainWindow::refreshViews() const bool splitView = GeneralSettings::splitView(); m_tabWidget->currentTabPage()->setSplitViewEnabled(splitView); updateSplitAction(); + setUrlAsCaption(activeViewContainer()->url()); } emit settingsChanged(); |
