new feature: allow for files and directories deletion in browser

This commit is contained in:
Andrzej Rybczak
2009-05-23 17:09:41 +02:00
parent ecd4c8cc17
commit 8f5df28e62
7 changed files with 115 additions and 1 deletions

View File

@@ -278,6 +278,8 @@ void DefaultConfiguration(ncmpcpp_config &conf)
conf.block_search_constraints_change = true;
conf.use_console_editor = false;
conf.use_cyclic_scrolling = false;
conf.allow_physical_files_deletion = false;
conf.allow_physical_directories_deletion = false;
conf.set_window_title = true;
conf.mpd_port = 6600;
conf.mpd_connection_timeout = 15;
@@ -669,6 +671,14 @@ void ReadConfiguration(ncmpcpp_config &conf)
{
conf.block_search_constraints_change = v == "yes";
}
else if (cl.find("allow_physical_files_deletion") != string::npos)
{
conf.allow_physical_files_deletion = v == "yes";
}
else if (cl.find("allow_physical_directories_deletion") != string::npos)
{
conf.allow_physical_directories_deletion = v == "yes";
}
else if (cl.find("enable_window_title") != string::npos)
{
conf.set_window_title = v == "yes";