media library: change data fetch delay to 250ms

master
Andrzej Rybczak 12 years ago
parent 44302aee47
commit 301de2a4fe
  1. 11
      src/media_library.cpp
  2. 2
      src/media_library.h

@ -47,7 +47,8 @@ MediaLibrary *myLibrary;
namespace {
const auto fetch_delay = boost::posix_time::milliseconds(500);
const auto ml_wtimeout = 250;
const auto fetch_delay = boost::posix_time::milliseconds(ml_wtimeout);
bool hasTwoColumns;
size_t itsLeftColStartX;
@ -422,6 +423,14 @@ void MediaLibrary::update()
}
}
int MediaLibrary::windowTimeout()
{
if (Albums.reallyEmpty() || Songs.reallyEmpty())
return ml_wtimeout;
else
return Screen<WindowType>::windowTimeout();
}
void MediaLibrary::enterPressed()
{
AddToPlaylist(true);

@ -37,6 +37,8 @@ struct MediaLibrary: Screen<NC::Window *>, Filterable, HasColumns, HasSongs, Sea
virtual void refresh() OVERRIDE;
virtual void update() OVERRIDE;
virtual int windowTimeout() OVERRIDE;
virtual void enterPressed() OVERRIDE;
virtual void spacePressed() OVERRIDE;
virtual void mouseButtonPressed(MEVENT me) OVERRIDE;

Loading…
Cancel
Save