fix refreshing in clock screen while resizing / remove some unneded code
This commit is contained in:
@@ -67,7 +67,6 @@ void Browser::SwitchTo()
|
|||||||
CLEAR_FIND_HISTORY;
|
CLEAR_FIND_HISTORY;
|
||||||
w->Empty() ? myBrowser->GetDirectory(itsBrowsedDir) : myBrowser->UpdateItemList();
|
w->Empty() ? myBrowser->GetDirectory(itsBrowsedDir) : myBrowser->UpdateItemList();
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
w->Hide();
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,8 +367,6 @@ void Browser::GetDirectory(string dir, string subdir)
|
|||||||
}
|
}
|
||||||
if (highlightme >= 0)
|
if (highlightme >= 0)
|
||||||
w->Highlight(highlightme);
|
w->Highlight(highlightme);
|
||||||
if (myScreen == myBrowser)
|
|
||||||
w->Hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Browser::ChangeBrowseMode()
|
void Browser::ChangeBrowseMode()
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ void Clock::Resize()
|
|||||||
w->MoveTo((COLS-Width)/2, (LINES-Height)/2);
|
w->MoveTo((COLS-Width)/2, (LINES-Height)/2);
|
||||||
if (myScreen == this)
|
if (myScreen == this)
|
||||||
{
|
{
|
||||||
|
if (myPlaylist->hasToBeResized)
|
||||||
|
myPlaylist->Resize();
|
||||||
myPlaylist->Main()->Hide();
|
myPlaylist->Main()->Hide();
|
||||||
w->Display();
|
w->Display();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ void Help::SwitchTo()
|
|||||||
Resize();
|
Resize();
|
||||||
|
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
w->Hide();
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ void Info::GetSong()
|
|||||||
w->Clear();
|
w->Clear();
|
||||||
PrepareSong(*s);
|
PrepareSong(*s);
|
||||||
w->Flush();
|
w->Flush();
|
||||||
w->Hide();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +143,6 @@ void Info::GetArtist()
|
|||||||
itsTitle = "Artist's info - " + *artist;
|
itsTitle = "Artist's info - " + *artist;
|
||||||
w->Clear();
|
w->Clear();
|
||||||
w->WriteXY(0, 0, 0, "Fetching artist's info...");
|
w->WriteXY(0, 0, 0, "Fetching artist's info...");
|
||||||
w->Refresh();
|
|
||||||
if (!Downloader)
|
if (!Downloader)
|
||||||
{
|
{
|
||||||
pthread_create(&Downloader, NULL, PrepareArtist, artist);
|
pthread_create(&Downloader, NULL, PrepareArtist, artist);
|
||||||
|
|||||||
@@ -120,9 +120,8 @@ void Lyrics::SwitchTo()
|
|||||||
myScreen = this;
|
myScreen = this;
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
w->Clear();
|
w->Clear();
|
||||||
w->WriteXY(0, 0, 0, "Fetching lyrics...");
|
|
||||||
w->Refresh();
|
|
||||||
# ifdef HAVE_CURL_CURL_H
|
# ifdef HAVE_CURL_CURL_H
|
||||||
|
w->WriteXY(0, 0, 0, "Fetching lyrics...");
|
||||||
if (!Downloader)
|
if (!Downloader)
|
||||||
{
|
{
|
||||||
pthread_create(&Downloader, NULL, Get, &itsSong);
|
pthread_create(&Downloader, NULL, Get, &itsSong);
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ void MediaLibrary::SwitchTo()
|
|||||||
|
|
||||||
CLEAR_FIND_HISTORY;
|
CLEAR_FIND_HISTORY;
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
Refresh();
|
Refresh();
|
||||||
UpdateSongList(Songs);
|
UpdateSongList(Songs);
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ void Playlist::SwitchTo()
|
|||||||
|
|
||||||
CLEAR_FIND_HISTORY;
|
CLEAR_FIND_HISTORY;
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
w->Hide();
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ void PlaylistEditor::SwitchTo()
|
|||||||
|
|
||||||
CLEAR_FIND_HISTORY;
|
CLEAR_FIND_HISTORY;
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
Refresh();
|
Refresh();
|
||||||
UpdateSongList(Content);
|
UpdateSongList(Content);
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ void Scrollpad::Clear(bool clrscr)
|
|||||||
SetColor(itsColor, itsBgColor);
|
SetColor(itsColor, itsBgColor);
|
||||||
keypad(itsWindow, 1);
|
keypad(itsWindow, 1);
|
||||||
if (clrscr)
|
if (clrscr)
|
||||||
Window::Clear();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
Scrollpad &Scrollpad::operator<<(std::ostream &(*os)(std::ostream&))
|
Scrollpad &Scrollpad::operator<<(std::ostream &(*os)(std::ostream&))
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ void SearchEngine::SwitchTo()
|
|||||||
if (w->Empty())
|
if (w->Empty())
|
||||||
Prepare();
|
Prepare();
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
w->Hide();
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
|
|
||||||
if (!w->Back().first)
|
if (!w->Back().first)
|
||||||
|
|||||||
@@ -361,7 +361,6 @@ void TagEditor::SwitchTo()
|
|||||||
CLEAR_FIND_HISTORY;
|
CLEAR_FIND_HISTORY;
|
||||||
|
|
||||||
myScreen = this;
|
myScreen = this;
|
||||||
myPlaylist->Main()->Hide(); // hack, should be myScreen, but it doesn't always have 100% width
|
|
||||||
redraw_header = 1;
|
redraw_header = 1;
|
||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user