tag editor: add support for numerating tracks using xx/xx format
This commit is contained in:
@@ -290,6 +290,8 @@
|
|||||||
#
|
#
|
||||||
#empty_tag_marker = "<empty>"
|
#empty_tag_marker = "<empty>"
|
||||||
#
|
#
|
||||||
|
#tag_editor_extended_numeration = "no"
|
||||||
|
#
|
||||||
#enable_window_title = "yes"
|
#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
|
.B allow_physical_directories_deletion = yes/no
|
||||||
If enabled, ncmpcpp will be able to delete directories using its browser screen.
|
If enabled, ncmpcpp will be able to delete directories using its browser screen.
|
||||||
.TP
|
.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
|
.B enable_window_title = yes/no
|
||||||
If enabled, ncmpcpp will override current window title with its own one.
|
If enabled, ncmpcpp will override current window title with its own one.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -320,6 +320,7 @@ void DefaultConfiguration(ncmpcpp_config &conf)
|
|||||||
conf.new_design = false;
|
conf.new_design = false;
|
||||||
conf.visualizer_use_wave = true;
|
conf.visualizer_use_wave = true;
|
||||||
conf.browser_sort_by_mtime = false;
|
conf.browser_sort_by_mtime = false;
|
||||||
|
conf.tag_editor_extended_numeration = false;
|
||||||
conf.set_window_title = true;
|
conf.set_window_title = true;
|
||||||
conf.mpd_port = 6600;
|
conf.mpd_port = 6600;
|
||||||
conf.mpd_connection_timeout = 15;
|
conf.mpd_connection_timeout = 15;
|
||||||
@@ -853,6 +854,10 @@ void ReadConfiguration(ncmpcpp_config &conf)
|
|||||||
{
|
{
|
||||||
conf.new_design = v == "alternative";
|
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)
|
else if (cl.find("enable_window_title") != std::string::npos)
|
||||||
{
|
{
|
||||||
conf.set_window_title = v == "yes";
|
conf.set_window_title = v == "yes";
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ struct ncmpcpp_config
|
|||||||
bool new_design;
|
bool new_design;
|
||||||
bool visualizer_use_wave;
|
bool visualizer_use_wave;
|
||||||
bool browser_sort_by_mtime;
|
bool browser_sort_by_mtime;
|
||||||
|
bool tag_editor_extended_numeration;
|
||||||
|
|
||||||
int mpd_port;
|
int mpd_port;
|
||||||
int mpd_connection_timeout;
|
int mpd_connection_timeout;
|
||||||
|
|||||||
@@ -547,7 +547,12 @@ void TagEditor::EnterPressed()
|
|||||||
{
|
{
|
||||||
MPD::SongList::iterator it = EditedSongs.begin();
|
MPD::SongList::iterator it = EditedSongs.begin();
|
||||||
for (unsigned i = 1; i <= EditedSongs.size(); ++i, ++it)
|
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!");
|
ShowMessage("Tracks numbered!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user