summaryrefslogtreecommitdiff
path: root/src/display.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2009-08-24 20:57:40 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2009-08-24 20:57:40 +0200
commit3998cb80f241a9b6f395678708859a147ee3305a (patch)
tree9df0bf91168f7d6e37380d5b07128bdc40f9e714 /src/display.cpp
parentc961ab411c6c9821059bddacdfaa84c0bba7a30a (diff)
new attribute for a columns view: do not display empty tag marker
Diffstat (limited to 'src/display.cpp')
-rw-r--r--src/display.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/display.cpp b/src/display.cpp
index 89df3af1..a8d262e5 100644
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -181,16 +181,19 @@ void Display::SongsInColumns(const MPD::Song &s, void *, Menu<MPD::Song> *menu)
std::string tag = (s.*get)();
if (it->right_alignment)
{
- int x, y;
- menu->GetXY(x, y);
- std::basic_string<my_char_t> wtag = TO_WSTRING(tag.empty() ? Config.empty_tag : tag).substr(0, width-!!x);
- *menu << XY(x+width-Window::Length(wtag)-!!x, y) << wtag;
+ if (!tag.empty() || it->display_empty_tag)
+ {
+ int x, y;
+ menu->GetXY(x, y);
+ std::basic_string<my_char_t> wtag = TO_WSTRING(tag.empty() ? Config.empty_tag : tag).substr(0, width-!!x);
+ *menu << XY(x+width-Window::Length(wtag)-!!x, y) << wtag;
+ }
}
else
{
if (!tag.empty())
*menu << tag;
- else
+ else if (it->display_empty_tag)
*menu << Config.empty_tag;
}
where += width;