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

@@ -226,6 +226,8 @@
# #
#selected_item_suffix = "$9" #selected_item_suffix = "$9"
# #
#modified_item_prefix = "$2> $9"
#
## colors are not supported for below variable ## colors are not supported for below variable
# #
#song_window_title_format = "{%a - }{%t}|{%f}" #song_window_title_format = "{%a - }{%t}|{%f}"

View File

@@ -159,6 +159,9 @@ Prefix for selected items.
.B selected_item_suffix = TEXT .B selected_item_suffix = TEXT
Suffix for selected items. Suffix for selected items.
.TP .TP
.B modified_item_prefix = TEXT
Prefix for modified item (tag editor).
.TP
.B alternative_header_first_line_format = TEXT .B alternative_header_first_line_format = TEXT
Now playing song format for the first line in alternative user interface header window. Now playing song format for the first line in alternative user interface header window.
.TP .TP

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) void Display::Tags(NC::Menu<MPD::MutableSong> &menu)
{ {
const MPD::MutableSong &s = menu.drawn()->value(); const MPD::MutableSong &s = menu.drawn()->value();
if (s.isModified())
menu << Config.modified_item_prefix;
size_t i = myTagEditor->TagTypes->choice(); size_t i = myTagEditor->TagTypes->choice();
if (i < 11) if (i < 11)
{ {

View File

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

View File

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