stop using literal 500 as a window timeout
This commit is contained in:
@@ -2686,7 +2686,7 @@ void seek()
|
|||||||
auto t = Timer;
|
auto t = Timer;
|
||||||
|
|
||||||
int old_timeout = wFooter->getTimeout();
|
int old_timeout = wFooter->getTimeout();
|
||||||
wFooter->setTimeout(500);
|
wFooter->setTimeout(BaseScreen::defaultWindowTimeout);
|
||||||
|
|
||||||
auto seekForward = &Actions::get(Actions::Type::SeekForward);
|
auto seekForward = &Actions::get(Actions::Type::SeekForward);
|
||||||
auto seekBackward = &Actions::get(Actions::Type::SeekBackward);
|
auto seekBackward = &Actions::get(Actions::Type::SeekBackward);
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
|
|
||||||
MediaLibrary::MediaLibrary()
|
MediaLibrary::MediaLibrary()
|
||||||
: m_timer(boost::posix_time::from_time_t(0))
|
: m_timer(boost::posix_time::from_time_t(0))
|
||||||
, m_window_timeout(Config.data_fetching_delay ? 250 : 500)
|
, m_window_timeout(Config.data_fetching_delay ? 250 : BaseScreen::defaultWindowTimeout)
|
||||||
, m_fetching_delay(boost::posix_time::milliseconds(Config.data_fetching_delay ? 250 : -1))
|
, m_fetching_delay(boost::posix_time::milliseconds(Config.data_fetching_delay ? 250 : -1))
|
||||||
{
|
{
|
||||||
hasTwoColumns = 0;
|
hasTwoColumns = 0;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ bool SongEntryMatcher(const Regex::Regex &rx, const MPD::Song &s);
|
|||||||
|
|
||||||
PlaylistEditor::PlaylistEditor()
|
PlaylistEditor::PlaylistEditor()
|
||||||
: m_timer(boost::posix_time::from_time_t(0))
|
: m_timer(boost::posix_time::from_time_t(0))
|
||||||
, m_window_timeout(Config.data_fetching_delay ? 250 : 500)
|
, m_window_timeout(Config.data_fetching_delay ? 250 : BaseScreen::defaultWindowTimeout)
|
||||||
, m_fetching_delay(boost::posix_time::milliseconds(Config.data_fetching_delay ? 250 : -1))
|
, m_fetching_delay(boost::posix_time::milliseconds(Config.data_fetching_delay ? 250 : -1))
|
||||||
{
|
{
|
||||||
LeftColumnWidth = COLS/3-1;
|
LeftColumnWidth = COLS/3-1;
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ struct BaseScreen
|
|||||||
/// Unlocks a screen, ie. hides merged window (if there is one set).
|
/// Unlocks a screen, ie. hides merged window (if there is one set).
|
||||||
static void unlock();
|
static void unlock();
|
||||||
|
|
||||||
|
const static int defaultWindowTimeout = 500;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Gets X offset and width of current screen to be used eg. in resize() function.
|
/// Gets X offset and width of current screen to be used eg. in resize() function.
|
||||||
/// @param adjust_locked_screen indicates whether this function should
|
/// @param adjust_locked_screen indicates whether this function should
|
||||||
@@ -187,9 +189,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// @return timeout parameter used for the screen (in ms)
|
/// @return timeout parameter used for the screen (in ms)
|
||||||
/// @default 500
|
/// @default defaultWindowTimeout
|
||||||
virtual int windowTimeout() OVERRIDE {
|
virtual int windowTimeout() OVERRIDE {
|
||||||
return 500;
|
return defaultWindowTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Invoked after there was one of mouse buttons pressed
|
/// Invoked after there was one of mouse buttons pressed
|
||||||
|
|||||||
Reference in New Issue
Block a user