diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-27 11:14:07 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-27 11:19:05 +0200 |
commit | b7ceae72734f2886577c3b7a27b8f134f8051e70 (patch) | |
tree | bcaef14b1657dc4f2aa0c718235bef7c08f1d985 /src/playlist.cpp | |
parent | 7fdace835b34f7655641f742eaf5fa428ca5248b (diff) |
replace timeval and time_t with boost::posix_time::ptime
Diffstat (limited to 'src/playlist.cpp')
-rw-r--r-- | src/playlist.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/playlist.cpp b/src/playlist.cpp index 0775e7a7..6d05cbd7 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -97,6 +97,17 @@ std::wstring Playlist::title() return result; } +void Playlist::update() +{ + if (Config.playlist_disable_highlight_delay.time_duration::seconds() > 0 + && w.isHighlighted() + && Global::Timer - itsTimer > Config.playlist_disable_highlight_delay) + { + w.setHighlighting(false); + w.refresh(); + } +} + void Playlist::enterPressed() { if (!w.empty()) @@ -260,12 +271,7 @@ void Playlist::Reverse() void Playlist::EnableHighlighting() { w.setHighlighting(true); - UpdateTimer(); -} - -void Playlist::UpdateTimer() -{ - std::time(&itsTimer); + itsTimer = Global::Timer; } std::string Playlist::TotalLength() |