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

@@ -44,6 +44,8 @@ class Browser : public Screen< Menu<MPD::Item> >
virtual void ReverseSelection();
virtual void GetSelectedSongs(MPD::SongList &);
virtual void ApplyFilter(const std::string &s) { w->ApplyFilter(s, itsBrowsedDir == "/" ? 0 : 1); }
virtual List *GetList() { return w; }
const std::string &CurrentDir() { return itsBrowsedDir; }
@@ -53,6 +55,8 @@ class Browser : public Screen< Menu<MPD::Item> >
void UpdateItemList();
protected:
static std::string ItemToString(const MPD::Item &, void *);
size_t itsScrollBeginning;
std::string itsBrowsedDir;