allow for colors in song_status_format

This commit is contained in:
Andrzej Rybczak
2009-08-13 18:10:41 +02:00
parent 5a9369b585
commit 42fee12eb0
2 changed files with 8 additions and 8 deletions

View File

@@ -79,6 +79,8 @@
# #
#song_list_format = "{%a - }{%t}|{$8%f$9}%r{$3(%l)$9}" #song_list_format = "{%a - }{%t}|{$8%f$9}%r{$3(%l)$9}"
# #
#song_status_format = "{(%l) }{%a - }{%t}|{%f}"
#
#song_library_format = "{%n - }{%t}|{%f}" #song_library_format = "{%n - }{%t}|{%f}"
# #
#tag_editor_album_format = "{(%y) }%b" #tag_editor_album_format = "{(%y) }%b"
@@ -109,9 +111,7 @@
# #
#alternative_header_second_line_format = "{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}" #alternative_header_second_line_format = "{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}"
# #
## colors are not supported for below veriables ## colors are not supported for below variable
#
#song_status_format = "{(%l) }{%a - }{%t}|{%f}"
# #
#song_window_title_format = "{%a - }{%t}|{%f}" #song_window_title_format = "{%a - }{%t}|{%f}"
# #

View File

@@ -458,11 +458,11 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *)
tracklength += Song::ShowTime(elapsed); tracklength += Song::ShowTime(elapsed);
tracklength += "]"; tracklength += "]";
} }
*wFooter << XY(0, 1) << wclrtoeol << player_state basic_buffer<my_char_t> np_song;
<< fmtBoldEnd String2Buffer(TO_WSTRING(utf_to_locale_cpy(np.toString(Config.song_status_format))), np_song);
<< Scroller(utf_to_locale_cpy(np.toString(Config.song_status_format)), wFooter->GetWidth()-player_state.length()-tracklength.length(), playing_song_scroll_begin) *wFooter << XY(0, 1) << wclrtoeol << player_state << fmtBoldEnd;
<< fmtBold np_song.Write(*wFooter, playing_song_scroll_begin, wFooter->GetWidth()-player_state.length()-tracklength.length(), U(" ** "));
<< XY(wFooter->GetWidth()-tracklength.length(), 1) << tracklength; *wFooter << fmtBold << XY(wFooter->GetWidth()-tracklength.length(), 1) << tracklength;
} }
if (!block_progressbar_update) if (!block_progressbar_update)
{ {