diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2012-09-02 20:51:20 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2012-09-02 20:51:20 +0200 |
commit | 5e8d1673e014e5d9af4c5538ae938d7c414a2ed3 (patch) | |
tree | 389d567eaa8a5e60a45b18048c6de1b5547ae914 /src/browser.cpp | |
parent | 0cfe5d8f01cae20ea0751f28bf16c8a6ff818fc2 (diff) |
implement ProxySongList for handling general operations on lists
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index 57224466..f17a5364 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -301,6 +301,16 @@ void Browser::prevFound(bool wrap) /***********************************************************************/ +std::shared_ptr<ProxySongList> Browser::getProxySongList() +{ + return mkProxySongList(*w, [](NC::Menu<MPD::Item>::Item &item) { + MPD::Song *ptr = 0; + if (item.value().type == itSong) + ptr = item.value().song.get(); + return ptr; + }); +} + MPD::Song *Browser::getSong(size_t pos) { MPD::Song *ptr = 0; @@ -322,11 +332,6 @@ bool Browser::allowsSelection() return true; } -void Browser::removeSelection() -{ - removeSelectionHelper(w->Begin(), w->End()); -} - void Browser::reverseSelection() { reverseSelectionHelper(w->Begin()+(itsBrowsedDir == "/" ? 0 : 1), w->End()); |