diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2013-12-25 23:31:27 +0100 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2013-12-25 23:31:27 +0100 |
commit | 70945596ef4abbdbaaeb30f52d9070ad07da8804 (patch) | |
tree | e1e157b9ae2444713ba8164016e9a0af1e17d09d /src/statusbar.h | |
parent | 819d8baebd917ea64834eee4072f3c28d5536e51 (diff) |
window: use readline for handling line input
Diffstat (limited to 'src/statusbar.h')
-rw-r--r-- | src/statusbar.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/statusbar.h b/src/statusbar.h index 8edea90a..699eef92 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -71,27 +71,28 @@ namespace Helpers {// void mpd(); /// called each time user types another character while inside Window::getString -bool getString(const std::wstring &); +bool getString(const char *); /// called each time user changes current filter (while being inside Window::getString) struct ApplyFilterImmediately { - ApplyFilterImmediately(Filterable *f, const std::wstring &filter) - : m_f(f), m_ws(filter) { } + template <typename StringT> + ApplyFilterImmediately(Filterable *f, StringT &&filter) + : m_f(f), m_s(std::forward<StringT>(filter)) { } - bool operator()(const std::wstring &ws); + bool operator()(const char *s); private: Filterable *m_f; - std::wstring m_ws; + std::string m_s; }; struct TryExecuteImmediateCommand { - bool operator()(const std::wstring &ws); + bool operator()(const char *s); private: - std::wstring m_ws; + std::string m_s; }; } |