summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.cpp2
-rw-r--r--src/media_library.cpp2
-rw-r--r--src/playlist_editor.cpp2
-rw-r--r--src/screen.h6
4 files changed, 7 insertions, 5 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index 06b762b7..0405e474 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -2686,7 +2686,7 @@ void seek()
auto t = Timer;
int old_timeout = wFooter->getTimeout();
- wFooter->setTimeout(500);
+ wFooter->setTimeout(BaseScreen::defaultWindowTimeout);
auto seekForward = &Actions::get(Actions::Type::SeekForward);
auto seekBackward = &Actions::get(Actions::Type::SeekBackward);
diff --git a/src/media_library.cpp b/src/media_library.cpp
index b8bb9dd9..ea630ad1 100644
--- a/src/media_library.cpp
+++ b/src/media_library.cpp
@@ -163,7 +163,7 @@ public:
MediaLibrary::MediaLibrary()
: 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))
{
hasTwoColumns = 0;
diff --git a/src/playlist_editor.cpp b/src/playlist_editor.cpp
index 36fe3d5a..6012b704 100644
--- a/src/playlist_editor.cpp
+++ b/src/playlist_editor.cpp
@@ -62,7 +62,7 @@ bool SongEntryMatcher(const Regex::Regex &rx, const MPD::Song &s);
PlaylistEditor::PlaylistEditor()
: 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))
{
LeftColumnWidth = COLS/3-1;
diff --git a/src/screen.h b/src/screen.h
index 2ec9d28e..a8c88959 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -101,6 +101,8 @@ struct BaseScreen
/// Unlocks a screen, ie. hides merged window (if there is one set).
static void unlock();
+ const static int defaultWindowTimeout = 500;
+
protected:
/// Gets X offset and width of current screen to be used eg. in resize() function.
/// @param adjust_locked_screen indicates whether this function should
@@ -187,9 +189,9 @@ public:
}
/// @return timeout parameter used for the screen (in ms)
- /// @default 500
+ /// @default defaultWindowTimeout
virtual int windowTimeout() OVERRIDE {
- return 500;
+ return defaultWindowTimeout;
}
/// Invoked after there was one of mouse buttons pressed