convert id3 tags, directories and playlist names to current locale if needed

notice: this feature needs unicode disabled.
This commit is contained in:
Andrzej Rybczak
2009-01-11 15:36:14 +01:00
parent 5b3357c54c
commit 0d9aea79c2
10 changed files with 395 additions and 44 deletions

View File

@@ -19,6 +19,7 @@
***************************************************************************/
#include "browser.h"
#include "charset.h"
#include "helpers.h"
#include "search_engine.h"
#include "settings.h"
@@ -338,7 +339,9 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
if (s.GetTotalLength() && elapsed == s.GetTotalLength()-1)
repeat_one_allowed = 1;
WindowTitle(s.toString(Config.song_window_title_format));
string song_str = s.toString(Config.song_window_title_format);
utf_to_locale(song_str);
WindowTitle(song_str);
if (!block_statusbar_update && Config.statusbar_visibility)
{
@@ -359,7 +362,9 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
}
wFooter->WriteXY(0, 1, 1, "%s", player_state.c_str());
wFooter->Bold(0);
Scroller(*wFooter, s.toString(Config.song_status_format), wFooter->GetWidth()-player_state.length()-tracklength.length(), playing_song_scroll_begin);
song_str = s.toString(Config.song_status_format);
utf_to_locale(song_str);
Scroller(*wFooter, song_str, wFooter->GetWidth()-player_state.length()-tracklength.length(), playing_song_scroll_begin);
wFooter->Bold(1);
wFooter->WriteXY(wFooter->GetWidth()-tracklength.length(), 1, 1, "%s", tracklength.c_str());