diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2009-03-08 01:58:49 +0100 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2009-03-08 01:58:49 +0100 |
commit | eed4fb03ff8d147920779f72fa1808b224adf31e (patch) | |
tree | 4576cf8993da792a8b8b114fba17c7af2c039ac4 /src/lyrics.cpp | |
parent | b21ede24f4a404c58d21b07570dbfe643e761187 (diff) |
use CamelCase for variables in Global namespace / some cleaning
Diffstat (limited to 'src/lyrics.cpp')
-rw-r--r-- | src/lyrics.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lyrics.cpp b/src/lyrics.cpp index bcec557e..9c6f8064 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -49,23 +49,23 @@ bool Lyrics::Reload = 0; std::string Lyrics::Filename; #ifdef HAVE_CURL_CURL_H -pthread_mutex_t Global::curl = PTHREAD_MUTEX_INITIALIZER; +pthread_t Lyrics::Downloader = 0; +pthread_mutex_t Global::CurlLock = PTHREAD_MUTEX_INITIALIZER; bool Lyrics::Ready = 0; -pthread_t Lyrics::Downloader = 0; #endif Lyrics *myLyrics = new Lyrics; void Lyrics::Init() { - w = new Scrollpad(0, main_start_y, COLS, main_height, "", Config.main_color, brNone); + w = new Scrollpad(0, MainStartY, COLS, MainHeight, "", Config.main_color, brNone); w->SetTimeout(ncmpcpp_window_timeout); } void Lyrics::Resize() { - w->Resize(COLS, main_height); + w->Resize(COLS, MainHeight); hasToBeResized = 0; } @@ -124,7 +124,7 @@ void Lyrics::SwitchTo() myOldScreen = myScreen; myScreen = this; } - redraw_header = 1; + RedrawHeader = 1; w->Clear(); # ifdef HAVE_CURL_CURL_H static_cast<Window &>(*w) << "Fetching lyrics..."; @@ -144,7 +144,7 @@ void Lyrics::SwitchTo() std::string Lyrics::Title() { string result = "Lyrics: "; - result += TO_STRING(Scroller(itsSong.toString("%a - %t"), COLS-result.length()-volume_state.length(), itsScrollBegin)); + result += TO_STRING(Scroller(itsSong.toString("%a - %t"), COLS-result.length()-VolumeState.length(), itsScrollBegin)); return result; } @@ -201,7 +201,7 @@ void *Lyrics::Get(void *song) url.replace(url.find("%artist%"), 8, c_artist); url.replace(url.find("%title%"), 7, c_title); - pthread_mutex_lock(&curl); + pthread_mutex_lock(&CurlLock); CURL *lyrics = curl_easy_init(); curl_easy_setopt(lyrics, CURLOPT_URL, url.c_str()); curl_easy_setopt(lyrics, CURLOPT_WRITEFUNCTION, write_data); @@ -210,7 +210,7 @@ void *Lyrics::Get(void *song) curl_easy_setopt(lyrics, CURLOPT_NOSIGNAL, 1); code = curl_easy_perform(lyrics); curl_easy_cleanup(lyrics); - pthread_mutex_unlock(&curl); + pthread_mutex_unlock(&CurlLock); curl_free(c_artist); curl_free(c_title); |