settings: support customizable tags separator

This commit is contained in:
Andrzej Rybczak
2012-09-12 21:44:27 +02:00
parent 6da434b5b2
commit d55070754d
21 changed files with 62 additions and 48 deletions

View File

@@ -65,7 +65,7 @@ char mpd_db_updating;
void drawTitle(const MPD::Song &np)
{
assert(!np.empty());
windowTitle(np.toString(Config.song_window_title_format));
windowTitle(np.toString(Config.song_window_title_format, Config.tags_separator));
}
}
@@ -345,8 +345,8 @@ void Status::Changes::elapsedTime()
}
NC::WBuffer first, second;
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.new_header_first_line, "$"))), first);
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.new_header_second_line, "$"))), second);
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.new_header_first_line, Config.tags_separator, "$"))), first);
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.new_header_second_line, Config.tags_separator, "$"))), second);
size_t first_len = wideLength(first.str());
size_t first_margin = (std::max(tracklength.length()+1, VolumeState.length()))*2;
@@ -397,7 +397,7 @@ void Status::Changes::elapsedTime()
tracklength += "]";
}
NC::WBuffer np_song;
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.song_status_format, "$"))), np_song);
stringToBuffer(ToWString(IConv::utf8ToLocale(np.toString(Config.song_status_format, Config.tags_separator, "$"))), np_song);
*wFooter << NC::XY(0, 1) << wclrtoeol << NC::fmtBold << player_state << NC::fmtBoldEnd;
np_song.write(*wFooter, playing_song_scroll_begin, wFooter->getWidth()-player_state.length()-tracklength.length(), L" ** ");
*wFooter << NC::fmtBold << NC::XY(wFooter->getWidth()-tracklength.length(), 1) << tracklength << NC::fmtBoldEnd;