tag editor: add modified_item_prefix to see modified items

This commit is contained in:
Andrzej Rybczak
2012-09-12 18:53:22 +02:00
parent 0d81f9d65f
commit fd6a5889d0
5 changed files with 17 additions and 0 deletions

View File

@@ -356,6 +356,8 @@ void Display::Songs(NC::Menu<MPD::Song> &menu, HasSongs *screen, const std::stri
void Display::Tags(NC::Menu<MPD::MutableSong> &menu)
{
const MPD::MutableSong &s = menu.drawn()->value();
if (s.isModified())
menu << Config.modified_item_prefix;
size_t i = myTagEditor->TagTypes->choice();
if (i < 11)
{

View File

@@ -180,6 +180,7 @@ void Configuration::SetDefaults()
selected_item_suffix << NC::clEnd;
now_playing_prefix << NC::fmtBold;
now_playing_suffix << NC::fmtBoldEnd;
modified_item_prefix << NC::clRed << "> " << NC::clEnd;
color1 = NC::clWhite;
color2 = NC::clGreen;
empty_tags_color = NC::clCyan;
@@ -575,6 +576,14 @@ void Configuration::Read()
now_playing_suffix_length = wideLength(now_playing_suffix.str());
}
}
else if (name == "modified_item_prefix")
{
if (!v.empty())
{
modified_item_prefix.clear();
String2Buffer(v, modified_item_prefix);
}
}
else if (name == "color1")
{
if (!v.empty())

View File

@@ -92,6 +92,7 @@ struct Configuration
NC::Buffer selected_item_suffix;
NC::Buffer now_playing_prefix;
NC::WBuffer now_playing_suffix;
NC::Buffer modified_item_prefix;
NC::Color color1;
NC::Color color2;