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.
This commit is contained in:
Andrzej Rybczak
2009-02-17 17:57:55 +01:00
parent 2cb9b46135
commit 5d2daab416
27 changed files with 472 additions and 171 deletions

View File

@@ -55,7 +55,9 @@ class SearchEngine : public Screen< Menu< std::pair<Buffer *, MPD::Song *> > >
virtual void ReverseSelection() { w->ReverseSelection(StaticOptions); }
virtual void GetSelectedSongs(MPD::SongList &);
virtual List *GetList() { return w; }
virtual void ApplyFilter(const std::string &s) { w->ApplyFilter(s, StaticOptions); }
virtual List *GetList() { return w->Size() >= StaticOptions ? w : 0; }
void UpdateFoundList();
@@ -70,6 +72,8 @@ class SearchEngine : public Screen< Menu< std::pair<Buffer *, MPD::Song *> > >
void Prepare();
void Search();
static std::string SearchEngineOptionToString(const std::pair<Buffer *, MPD::Song *> &, void *);
SearchPattern itsPattern;
static bool MatchToPattern;