┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Fella <[email protected]>2022-01-28 00:46:13 +0100
committerNate Graham <[email protected]>2022-01-31 18:16:29 +0000
commitca35c71f3dacf67d3763d0a218da713e40af5b36 (patch)
tree4706e67e4b006b2cf1a170362d165844600cd4b2
parent1c5b6d4d1042877863801e3c0b683e8a9c41be18 (diff)
Improve placeholder message for unassigned tag
When opening tags:/ we show 'No tags' when there are no tags found. When opening a tag that exists but doesn't have any files associated we show the same message, which isnt't appropriate. Instead show "No files tagged with 'foo'", which makes more sense
-rw-r--r--src/views/dolphinview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index 0a9783fe1..5646fa982 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -2166,7 +2166,13 @@ void DolphinView::updatePlaceholderLabel()
} else if (m_url.scheme() == QLatin1String("trash") && m_url.path() == QLatin1String("/")) {
m_placeholderLabel->setText(i18n("Trash is empty"));
} else if (m_url.scheme() == QLatin1String("tags")) {
- m_placeholderLabel->setText(i18n("No tags"));
+ if (m_url.path() == QLatin1Char('/')) {
+ m_placeholderLabel->setText(i18n("No tags"));
+ } else {
+ const QString tagName = m_url.path().mid(1); // Remove leading /
+ m_placeholderLabel->setText(i18n("No files tagged with \"%1\"", tagName));
+ }
+
} else if (m_url.scheme() == QLatin1String("recentlyused")) {
m_placeholderLabel->setText(i18n("No recently used items"));
} else if (m_url.scheme() == QLatin1String("smb")) {