diff --git a/doc/config b/doc/config index dbe02188..4f7d671b 100644 --- a/doc/config +++ b/doc/config @@ -290,6 +290,8 @@ # #empty_tag_marker = "" # +#tag_editor_extended_numeration = "no" +# #enable_window_title = "yes" # ## diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index a3cfcba2..1af17b50 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -246,6 +246,9 @@ If enabled, ncmpcpp will be able to delete files using its browser screen. .B allow_physical_directories_deletion = yes/no If enabled, ncmpcpp will be able to delete directories using its browser screen. .TP +.B tag_editor_extended_numeration = yes/no +If enabled, tag editor will number tracks using format xx/yy (where xx is the current track and yy is total amount of all numbered tracks), not plain xx. +.TP .B enable_window_title = yes/no If enabled, ncmpcpp will override current window title with its own one. .TP diff --git a/src/settings.cpp b/src/settings.cpp index d9f22163..8767fa8b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -320,6 +320,7 @@ void DefaultConfiguration(ncmpcpp_config &conf) conf.new_design = false; conf.visualizer_use_wave = true; conf.browser_sort_by_mtime = false; + conf.tag_editor_extended_numeration = false; conf.set_window_title = true; conf.mpd_port = 6600; conf.mpd_connection_timeout = 15; @@ -853,6 +854,10 @@ void ReadConfiguration(ncmpcpp_config &conf) { conf.new_design = v == "alternative"; } + else if (cl.find("tag_editor_extended_numeration") != std::string::npos) + { + conf.tag_editor_extended_numeration = v == "yes"; + } else if (cl.find("enable_window_title") != std::string::npos) { conf.set_window_title = v == "yes"; diff --git a/src/settings.h b/src/settings.h index 2fcce887..5c51fd08 100644 --- a/src/settings.h +++ b/src/settings.h @@ -213,6 +213,7 @@ struct ncmpcpp_config bool new_design; bool visualizer_use_wave; bool browser_sort_by_mtime; + bool tag_editor_extended_numeration; int mpd_port; int mpd_connection_timeout; diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index c47062a6..bc2438fd 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -547,7 +547,12 @@ void TagEditor::EnterPressed() { MPD::SongList::iterator it = EditedSongs.begin(); for (unsigned i = 1; i <= EditedSongs.size(); ++i, ++it) - (*it)->SetTrack(i); + { + if (Config.tag_editor_extended_numeration) + (*it)->SetTrack(IntoStr(i) + "/" + IntoStr(EditedSongs.size())); + else + (*it)->SetTrack(i); + } ShowMessage("Tracks numbered!"); } else