tag editor: add support for numerating tracks using xx/xx format

master
Andrzej Rybczak 17 years ago
parent 07099d4dc0
commit 0dc076742f
  1. 2
      doc/config
  2. 3
      doc/ncmpcpp.1
  3. 5
      src/settings.cpp
  4. 1
      src/settings.h
  5. 7
      src/tag_editor.cpp

@ -290,6 +290,8 @@
#
#empty_tag_marker = "<empty>"
#
#tag_editor_extended_numeration = "no"
#
#enable_window_title = "yes"
#
##

@ -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

@ -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";

@ -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;

@ -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

Loading…
Cancel
Save