aboutsummaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-21 14:40:04 +0000
committerKalle Wallin <kaw@linux.se>2004-04-21 14:40:04 +0000
commit41d5f057a8e0fa8ed4a0c8465ce8a1d0e7ab8e1a (patch)
tree7222f41ee15d60eb37a01f6e6d83716f32616b5b /screen.c
parent594de04459609f8a5a3ce6e368abc15adb3d1187 (diff)
downloadmpd-41d5f057a8e0fa8ed4a0c8465ce8a1d0e7ab8e1a.tar.gz
mpd-41d5f057a8e0fa8ed4a0c8465ce8a1d0e7ab8e1a.tar.xz
mpd-41d5f057a8e0fa8ed4a0c8465ce8a1d0e7ab8e1a.zip
Display the target time when seeking.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@869 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index ea5cc3625..ccf7c8cc7 100644
--- a/screen.c
+++ b/screen.c
@@ -214,6 +214,7 @@ paint_status_window(mpd_client_t *c)
WINDOW *w = screen->status_window.w;
mpd_Status *status = c->status;
mpd_Song *song = c->song;
+ int elapsedTime = c->status->elapsedTime;
int x = 0;
if( time(NULL) - screen->status_timestamp <= STATUS_MESSAGE_TIMEOUT )
@@ -254,13 +255,15 @@ paint_status_window(mpd_client_t *c)
/* time */
+ if( c->seek_song_id == c->song_id )
+ elapsedTime = c->seek_target_time;
if( IS_PLAYING(status->state) || IS_PAUSED(status->state) )
{
x = screen->status_window.cols - strlen(screen->buf);
snprintf(screen->buf, screen->buf_size,
" [%i:%02i/%i:%02i] ",
- status->elapsedTime/60, status->elapsedTime%60,
+ elapsedTime/60, elapsedTime%60,
status->totalTime/60, status->totalTime%60 );
mvwaddstr(w, 0, x, screen->buf);