diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-02 00:22:02 +0100 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-02 22:14:29 +0100 |
commit | 0457af36fef70d795afaf56c13a105b2016caad6 (patch) | |
tree | 7891f7cea36ec7b8c6f1ce0108dd903e9825fe0b /src/browser.h | |
parent | 30d57afcace02b6347cd5e644bd0a987717237fc (diff) |
mpd: redesign Item and adjust browser
Diffstat (limited to 'src/browser.h')
-rw-r--r-- | src/browser.h | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/browser.h b/src/browser.h index 13b39da2..1d06b3fa 100644 --- a/src/browser.h +++ b/src/browser.h @@ -63,31 +63,25 @@ struct Browser: Screen<NC::Menu<MPD::Item>>, Filterable, HasSongs, Searchable, T virtual MPD::SongList getSelectedSongs() OVERRIDE; // private members - const std::string &CurrentDir() { return itsBrowsedDir; } - - void fetchSupportedExtensions(); - - bool isLocal() { return itsBrowseLocally; } - void LocateSong(const MPD::Song &); - void GetDirectory(std::string, std::string = "/"); -# ifndef WIN32 - void GetLocalDirectory(MPD::ItemList &, const std::string &, bool) const; - void ClearDirectory(const std::string &) const; - void ChangeBrowseMode(); - bool deleteItem(const MPD::Item &, std::string &errmsg); -# endif // !WIN32 - - static bool isParentDirectory(const MPD::Item &item) { - return item.type == MPD::Item::Type::Directory && item.name == ".."; - } + bool inRootDirectory(); + bool isParentDirectory(const MPD::Item &item); + const std::string ¤tDirectory(); + bool isLocal() { return m_local_browser; } + void locateSong(const MPD::Song &s); + void getDirectory(std::string directory); + void changeBrowseMode(); + void remove(const MPD::Item &item); + + static void fetchSupportedExtensions(); + protected: virtual bool isLockable() OVERRIDE { return true; } private: - bool itsBrowseLocally; - size_t itsScrollBeginning; - std::string itsBrowsedDir; + bool m_local_browser; + size_t m_scroll_beginning; + std::string m_current_directory; }; extern Browser *myBrowser; |