diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-28 18:57:16 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-29 14:54:09 +0200 |
commit | 4b933b29e14d57d4b3a47bd043829618e8abbabe (patch) | |
tree | d82d6dd089a5f92820a1c5b2d03dc02c5f54eaec /src/playlist_editor.cpp | |
parent | 8a1e4a48dd598b5663fc60668755b0ce0a312c6c (diff) |
settings: configuration file processing rewrite
Diffstat (limited to 'src/playlist_editor.cpp')
-rw-r--r-- | src/playlist_editor.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/playlist_editor.cpp b/src/playlist_editor.cpp index dddb806d..7a5c5255 100644 --- a/src/playlist_editor.cpp +++ b/src/playlist_editor.cpp @@ -77,10 +77,15 @@ PlaylistEditor::PlaylistEditor() Content.centeredCursor(Config.centered_cursor); Content.setSelectedPrefix(Config.selected_item_prefix); Content.setSelectedSuffix(Config.selected_item_suffix); - if (Config.columns_in_playlist_editor) - Content.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, contentProxyList())); - else - Content.setItemDisplayer(boost::bind(Display::Songs, _1, contentProxyList(), Config.song_list_format)); + switch (Config.playlist_editor_display_mode) + { + case DisplayMode::Classic: + Content.setItemDisplayer(boost::bind(Display::Songs, _1, contentProxyList(), Config.song_list_format)); + break; + case DisplayMode::Columns: + Content.setItemDisplayer(boost::bind(Display::SongsInColumns, _1, contentProxyList())); + break; + } w = &Playlists; } @@ -550,10 +555,15 @@ namespace {// std::string SongToString(const MPD::Song &s) { std::string result; - if (Config.columns_in_playlist_editor) - result = s.toString(Config.song_in_columns_to_string_format, Config.tags_separator); - else - result = s.toString(Config.song_list_format_dollar_free, Config.tags_separator); + switch (Config.playlist_display_mode) + { + case DisplayMode::Classic: + result = s.toString(Config.song_list_format_dollar_free, Config.tags_separator); + break; + case DisplayMode::Columns: + result = s.toString(Config.song_in_columns_to_string_format, Config.tags_separator); + break; + } return result; } |