Settings: expand tilde to home directory in several more variables
This commit is contained in:
1
NEWS
1
NEWS
@@ -4,6 +4,7 @@ ncmpcpp-0.7.6 (????-??-??)
|
|||||||
* Make sure that stream of random numbers is not deterministic.
|
* Make sure that stream of random numbers is not deterministic.
|
||||||
* Opening playlist editor when there is no MPD playlists directory no longer freezes the application.
|
* Opening playlist editor when there is no MPD playlists directory no longer freezes the application.
|
||||||
* Added info about behavior of MPD_HOST and MPD_PORT environment variables to man page.
|
* Added info about behavior of MPD_HOST and MPD_PORT environment variables to man page.
|
||||||
|
* Tile will now be expanded to home directory in visualizer_fifo_path, execute_on_song_change and external_editor configuration variables.
|
||||||
|
|
||||||
ncmpcpp-0.7.5 (2016-08-17)
|
ncmpcpp-0.7.5 (2016-08-17)
|
||||||
* Action chains can be now used for seeking.
|
* Action chains can be now used for seeking.
|
||||||
|
|||||||
@@ -160,6 +160,12 @@ std::string adjust_directory(std::string s)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string adjust_path(std::string s)
|
||||||
|
{
|
||||||
|
expand_home(s);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
// parser worker for buffer
|
// parser worker for buffer
|
||||||
template <typename ValueT, typename TransformT>
|
template <typename ValueT, typename TransformT>
|
||||||
option_parser::worker buffer(NC::Buffer &arg, ValueT &&value, TransformT &&map)
|
option_parser::worker buffer(NC::Buffer &arg, ValueT &&value, TransformT &&map)
|
||||||
@@ -237,8 +243,8 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
|
|||||||
p.add("mpd_crossfade_time", assign_default(
|
p.add("mpd_crossfade_time", assign_default(
|
||||||
crossfade_time, 5
|
crossfade_time, 5
|
||||||
));
|
));
|
||||||
p.add("visualizer_fifo_path", assign_default(
|
p.add("visualizer_fifo_path", assign_default<std::string>(
|
||||||
visualizer_fifo_path, "/tmp/mpd.fifo"
|
visualizer_fifo_path, "/tmp/mpd.fifo", adjust_path
|
||||||
));
|
));
|
||||||
p.add("visualizer_output_name", assign_default(
|
p.add("visualizer_output_name", assign_default(
|
||||||
visualizer_output_name, "Visualizer feed"
|
visualizer_output_name, "Visualizer feed"
|
||||||
@@ -372,8 +378,8 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
|
|||||||
song_columns_mode_format = columns_to_format(columns);
|
song_columns_mode_format = columns_to_format(columns);
|
||||||
return v;
|
return v;
|
||||||
}));
|
}));
|
||||||
p.add("execute_on_song_change", assign_default(
|
p.add("execute_on_song_change", assign_default<std::string>(
|
||||||
execute_on_song_change, ""
|
execute_on_song_change, "", adjust_path
|
||||||
));
|
));
|
||||||
p.add("playlist_show_mpd_host", yes_no(
|
p.add("playlist_show_mpd_host", yes_no(
|
||||||
playlist_show_mpd_host, false
|
playlist_show_mpd_host, false
|
||||||
@@ -641,8 +647,8 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
|
|||||||
boundsCheck(v, 1u, 3u);
|
boundsCheck(v, 1u, 3u);
|
||||||
return --v;
|
return --v;
|
||||||
}));
|
}));
|
||||||
p.add("external_editor", assign_default(
|
p.add("external_editor", assign_default<std::string>(
|
||||||
external_editor, "nano"
|
external_editor, "nano", adjust_path
|
||||||
));
|
));
|
||||||
p.add("use_console_editor", yes_no(
|
p.add("use_console_editor", yes_no(
|
||||||
use_console_editor, true
|
use_console_editor, true
|
||||||
|
|||||||
Reference in New Issue
Block a user