new feature: shorten units' names displayed in statusbar while being in playlist

This commit is contained in:
Andrzej Rybczak
2010-05-14 15:53:50 +02:00
parent 20646600b8
commit 6eae6cd0f6
5 changed files with 13 additions and 2 deletions

View File

@@ -387,12 +387,12 @@ std::string Playlist::TotalLength()
if (itsTotalLength)
{
result << ", length: ";
ShowTime(result, itsTotalLength, 0);
ShowTime(result, itsTotalLength, Config.playlist_shorten_total_times);
}
if (Config.playlist_show_remaining_time && itsRemainingTime && !Items->isFiltered() && Items->Size() > 1)
{
result << " :: remaining: ";
ShowTime(result, itsRemainingTime, 0);
ShowTime(result, itsRemainingTime, Config.playlist_shorten_total_times);
}
result << ')';
return result.str();

View File

@@ -356,6 +356,7 @@ void NcmpcppConfig::SetDefaults()
colors_enabled = true;
fancy_scrolling = true;
playlist_show_remaining_time = false;
playlist_shorten_total_times = false;
playlist_separate_albums = false;
columns_in_playlist = false;
columns_in_browser = false;
@@ -833,6 +834,10 @@ void NcmpcppConfig::Read()
{
playlist_show_remaining_time = v == "yes";
}
else if (cl.find("playlist_shorten_total_times") != std::string::npos)
{
playlist_shorten_total_times = v == "yes";
}
else if (cl.find("playlist_separate_albums") != std::string::npos)
{
playlist_separate_albums = v == "yes";

View File

@@ -196,6 +196,7 @@ struct NcmpcppConfig
bool colors_enabled;
bool fancy_scrolling;
bool playlist_show_remaining_time;
bool playlist_shorten_total_times;
bool playlist_separate_albums;
bool columns_in_playlist;
bool columns_in_browser;