diff --git a/doc/config b/doc/config index 716d9b84..064be27a 100644 --- a/doc/config +++ b/doc/config @@ -226,6 +226,8 @@ # #selected_item_suffix = "$9" # +#modified_item_prefix = "$2> $9" +# ## colors are not supported for below variable # #song_window_title_format = "{%a - }{%t}|{%f}" diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index 6cf13772..136910f6 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -159,6 +159,9 @@ Prefix for selected items. .B selected_item_suffix = TEXT Suffix for selected items. .TP +.B modified_item_prefix = TEXT +Prefix for modified item (tag editor). +.TP .B alternative_header_first_line_format = TEXT Now playing song format for the first line in alternative user interface header window. .TP diff --git a/src/display.cpp b/src/display.cpp index c754a323..95654539 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -356,6 +356,8 @@ void Display::Songs(NC::Menu &menu, HasSongs *screen, const std::stri void Display::Tags(NC::Menu &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) { diff --git a/src/settings.cpp b/src/settings.cpp index ab2c8ae4..ec365950 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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()) diff --git a/src/settings.h b/src/settings.h index da17f82e..968f84b4 100644 --- a/src/settings.h +++ b/src/settings.h @@ -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;