settings: add config option to not confirm shuffling playlist

This commit is contained in:
Asa Sourdiffe
2015-12-22 12:21:20 -08:00
committed by Andrzej Rybczak
parent d2db864293
commit 20f37968c2
4 changed files with 7 additions and 1 deletions

1
NEWS
View File

@@ -1,5 +1,6 @@
ncmpcpp-0.7.1 (????-??-??)
* Selected songs in media library can now be added to playlists.
* Confirmation before shuffling a playlist can now be disabled.
ncmpcpp-0.7 (2015-11-22)
* Playlist sorting dialog now contains 'Album artist' option.

View File

@@ -1215,7 +1215,8 @@ bool Shuffle::canBeRun()
void Shuffle::run()
{
confirmAction("Do you really want to shuffle selected range?");
if (Config.ask_before_shuffling_playlists)
confirmAction("Do you really want to shuffle selected range?");
auto begin = myPlaylist->main().begin();
Mpd.ShuffleRange(m_begin-begin, m_end-begin);
Statusbar::print("Range shuffled");

View File

@@ -566,6 +566,9 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
p.add("ask_before_clearing_playlists", yes_no(
ask_before_clearing_playlists, true
));
p.add("ask_before_shuffling_playlists", yes_no(
ask_before_shuffling_playlists, true
));
p.add("clock_display_seconds", yes_no(
clock_display_seconds, false
));

View File

@@ -152,6 +152,7 @@ struct Configuration
bool use_console_editor;
bool use_cyclic_scrolling;
bool ask_before_clearing_playlists;
bool ask_before_shuffling_playlists;
bool mouse_support;
bool mouse_list_scroll_whole_page;
bool visualizer_in_stereo;