summaryrefslogtreecommitdiff
path: root/src/media_library.h
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2009-02-17 17:57:55 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2009-02-17 17:57:55 +0100
commit5d2daab41639df7534cb5379668d86519c8a886e (patch)
treebc9ba798bea7e8cdf56d5fa6f0259ebaf4da5477 /src/media_library.h
parent2cb9b461358796fd06d3c453bd1a6eb388e5c0bf (diff)
new feature: apply filter to screen (Ctrl-F)
if one applies a filter, only items that contain this filter will be displayed. works on all screens.
Diffstat (limited to 'src/media_library.h')
-rw-r--r--src/media_library.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/media_library.h b/src/media_library.h
index ca4b9476..cf445887 100644
--- a/src/media_library.h
+++ b/src/media_library.h
@@ -45,11 +45,15 @@ class MediaLibrary : public Screen<Window>
virtual void ReverseSelection() { Songs->ReverseSelection(); }
virtual void GetSelectedSongs(MPD::SongList &);
+ virtual void ApplyFilter(const std::string &s) { GetList()->ApplyFilter(s); }
+
virtual List *GetList();
void NextColumn();
void PrevColumn();
+ static std::string StringPairToString(const string_pair &pair, void *);
+
Menu<std::string> *Artists;
Menu<string_pair> *Albums;
Menu<MPD::Song> *Songs;
@@ -57,6 +61,8 @@ class MediaLibrary : public Screen<Window>
protected:
void AddToPlaylist(bool);
+ static std::string SongToString(const MPD::Song &s, void *);
+
static bool SortSongsByTrack(MPD::Song *, MPD::Song *);
static size_t itsLeftColWidth;