diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2009-08-24 20:57:40 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2009-08-24 20:57:40 +0200 |
commit | 3998cb80f241a9b6f395678708859a147ee3305a (patch) | |
tree | 9df0bf91168f7d6e37380d5b07128bdc40f9e714 /src/display.cpp | |
parent | c961ab411c6c9821059bddacdfaa84c0bba7a30a (diff) |
new attribute for a columns view: do not display empty tag marker
Diffstat (limited to 'src/display.cpp')
-rw-r--r-- | src/display.cpp | 13 |
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; |