fix refreshing in clock screen while resizing / remove some unneded code

This commit is contained in:
Andrzej Rybczak
2009-02-16 01:01:54 +01:00
parent ba6c2db0b1
commit ef9948cbe2
11 changed files with 4 additions and 14 deletions

View File

@@ -67,7 +67,6 @@ void Browser::SwitchTo()
CLEAR_FIND_HISTORY;
w->Empty() ? myBrowser->GetDirectory(itsBrowsedDir) : myBrowser->UpdateItemList();
myScreen = this;
w->Hide();
redraw_header = 1;
}
@@ -368,8 +367,6 @@ void Browser::GetDirectory(string dir, string subdir)
}
if (highlightme >= 0)
w->Highlight(highlightme);
if (myScreen == myBrowser)
w->Hide();
}
void Browser::ChangeBrowseMode()

View File

@@ -58,6 +58,8 @@ void Clock::Resize()
w->MoveTo((COLS-Width)/2, (LINES-Height)/2);
if (myScreen == this)
{
if (myPlaylist->hasToBeResized)
myPlaylist->Resize();
myPlaylist->Main()->Hide();
w->Display();
}

View File

@@ -52,7 +52,6 @@ void Help::SwitchTo()
Resize();
myScreen = this;
w->Hide();
redraw_header = 1;
}

View File

@@ -103,7 +103,6 @@ void Info::GetSong()
w->Clear();
PrepareSong(*s);
w->Flush();
w->Hide();
}
}
@@ -144,7 +143,6 @@ void Info::GetArtist()
itsTitle = "Artist's info - " + *artist;
w->Clear();
w->WriteXY(0, 0, 0, "Fetching artist's info...");
w->Refresh();
if (!Downloader)
{
pthread_create(&Downloader, NULL, PrepareArtist, artist);

View File

@@ -120,9 +120,8 @@ void Lyrics::SwitchTo()
myScreen = this;
redraw_header = 1;
w->Clear();
w->WriteXY(0, 0, 0, "Fetching lyrics...");
w->Refresh();
# ifdef HAVE_CURL_CURL_H
w->WriteXY(0, 0, 0, "Fetching lyrics...");
if (!Downloader)
{
pthread_create(&Downloader, NULL, Get, &itsSong);

View File

@@ -113,7 +113,6 @@ void MediaLibrary::SwitchTo()
CLEAR_FIND_HISTORY;
myScreen = this;
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
redraw_header = 1;
Refresh();
UpdateSongList(Songs);

View File

@@ -56,7 +56,6 @@ void Playlist::SwitchTo()
CLEAR_FIND_HISTORY;
myScreen = this;
w->Hide();
redraw_header = 1;
}

View File

@@ -98,7 +98,6 @@ void PlaylistEditor::SwitchTo()
CLEAR_FIND_HISTORY;
myScreen = this;
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
redraw_header = 1;
Refresh();
UpdateSongList(Content);

View File

@@ -218,7 +218,7 @@ void Scrollpad::Clear(bool clrscr)
SetColor(itsColor, itsBgColor);
keypad(itsWindow, 1);
if (clrscr)
Window::Clear();
Refresh();
}
Scrollpad &Scrollpad::operator<<(std::ostream &(*os)(std::ostream&))

View File

@@ -70,7 +70,6 @@ void SearchEngine::SwitchTo()
if (w->Empty())
Prepare();
myScreen = this;
w->Hide();
redraw_header = 1;
if (!w->Back().first)

View File

@@ -361,7 +361,6 @@ void TagEditor::SwitchTo()
CLEAR_FIND_HISTORY;
myScreen = this;
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
redraw_header = 1;
Refresh();