lyrics: some code beautification + Lyrics::SwitchTo() corrections

This commit is contained in:
Andrzej Rybczak
2010-08-13 05:45:34 +02:00
parent a1cd5ae1aa
commit 3afa0028e6
2 changed files with 46 additions and 50 deletions

View File

@@ -31,12 +31,10 @@ class Lyrics : public Screen<Scrollpad>
public:
Lyrics() : ReloadNP(0),
# ifdef HAVE_CURL_CURL_H
ReadyToTake(0), DownloadInProgress(0), Fetcher(0),
isReadyToTake(0), isDownloadInProgress(0), itsFetcher(0),
# endif // HAVE_CURL_CURL_H
itsScrollBegin(0) { }
~Lyrics() { }
virtual void Resize();
virtual void SwitchTo();
@@ -52,7 +50,6 @@ class Lyrics : public Screen<Scrollpad>
virtual List *GetList() { return 0; }
void Edit();
void Save(const std::string &lyrics);
void Refetch();
# ifdef HAVE_CURL_CURL_H
void ToggleFetcher();
@@ -66,18 +63,20 @@ class Lyrics : public Screen<Scrollpad>
private:
void Load();
std::string itsFilenamePath;
std::string itsFilename;
static const std::string Folder;
# ifdef HAVE_CURL_CURL_H
void *Download();
static void *DownloadWrapper(void *);
void Save(const std::string &lyrics);
void Take();
bool ReadyToTake;
bool DownloadInProgress;
pthread_t Downloader;
LyricsFetcher **Fetcher;
bool isReadyToTake;
bool isDownloadInProgress;
pthread_t itsDownloader;
LyricsFetcher **itsFetcher;
# endif // HAVE_CURL_CURL_H
size_t itsScrollBegin;