From d6fbb2f657657be30d701bcdf6ba40a7b607107d Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 15 Sep 2009 21:07:37 +0000 Subject: [PATCH] remove wrapper for Scroller() needed with --enable-unicode --- src/browser.cpp | 2 +- src/helpers.cpp | 7 ------- src/helpers.h | 3 --- src/lyrics.cpp | 2 +- src/playlist.cpp | 2 +- 5 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/browser.cpp b/src/browser.cpp index d16f5a86..c39a91c8 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -88,7 +88,7 @@ void Browser::SwitchTo() std::basic_string Browser::Title() { std::basic_string result = U("Browse: "); - result += Scroller(itsBrowsedDir, itsScrollBeginning, w->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); + result += Scroller(TO_WSTRING(itsBrowsedDir), itsScrollBeginning, w->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); return result; } diff --git a/src/helpers.cpp b/src/helpers.cpp index 56c2e622..f490de74 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -332,13 +332,6 @@ std::string ExtractTopDirectory(const std::string &s) return slash != std::string::npos ? s.substr(++slash) : s; } -#ifdef _UTF8 -std::basic_string Scroller(const std::string &str, size_t &pos, size_t width) -{ - return Scroller(TO_WSTRING(str), pos, width); -} -#endif // _UTF8 - std::basic_string Scroller(const std::basic_string &str, size_t &pos, size_t width) { std::basic_string s(str); diff --git a/src/helpers.h b/src/helpers.h index f559dc65..9f46503f 100644 --- a/src/helpers.h +++ b/src/helpers.h @@ -155,9 +155,6 @@ std::string ExtractTopDirectory(const std::string &); std::string GetLineValue(std::string &, char = '"', char = '"', bool = 0); -#ifdef _UTF8 -std::basic_string Scroller(const std::string &str, size_t &pos, size_t width); -#endif // _UTF8 std::basic_string Scroller(const std::basic_string &str, size_t &pos, size_t width); #ifdef HAVE_CURL_CURL_H diff --git a/src/lyrics.cpp b/src/lyrics.cpp index ac01a226..76e20af3 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -191,7 +191,7 @@ void Lyrics::SwitchTo() std::basic_string Lyrics::Title() { std::basic_string result = U("Lyrics: "); - result += Scroller(itsSong.toString("{%a - %t}"), itsScrollBegin, w->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); + result += Scroller(TO_WSTRING(itsSong.toString("{%a - %t}")), itsScrollBegin, w->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); return result; } diff --git a/src/playlist.cpp b/src/playlist.cpp index 684c9796..642a4cbc 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -132,7 +132,7 @@ std::basic_string Playlist::Title() std::basic_string result = U("Playlist "); if (ReloadTotalLength || ReloadRemaining) itsBufferedStats = TotalLength(); - result += Scroller(itsBufferedStats, itsScrollBegin, Items->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); + result += Scroller(TO_WSTRING(itsBufferedStats), itsScrollBegin, Items->GetWidth()-result.length()-(Config.new_design ? 2 : VolumeState.length())); return result; }