diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-15 22:07:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-22 23:26:18 +0000 |
| commit | 1b4d5951147bc88d771d0afaa98bbfa4ed85a822 (patch) | |
| tree | ee67880b8107aca4a8335a32a0ed09aa1c79200a /src/wx/content_view.cc | |
| parent | a3f6e20d055cdf1697eab011622dc569010ad617 (diff) | |
Basic save/load of playlists.
Diffstat (limited to 'src/wx/content_view.cc')
| -rw-r--r-- | src/wx/content_view.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc index 4eab80339..aeefb65df 100644 --- a/src/wx/content_view.cc +++ b/src/wx/content_view.cc @@ -32,6 +32,7 @@ #include <boost/optional.hpp> #include <wx/progdlg.h> +using std::string; using boost::shared_ptr; using boost::weak_ptr; using boost::optional; @@ -145,3 +146,15 @@ ContentView::add (shared_ptr<Content> content) it.SetText(std_to_wx(content->summary())); SetItem(it); } + +shared_ptr<Content> +ContentView::get (string digest) const +{ + BOOST_FOREACH (shared_ptr<Content> i, _content) { + if (i->digest() == digest) { + return i; + } + } + + return shared_ptr<Content>(); +} |
