From 05c678993b1a66d222bbe0a220261764f8843e66 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Tue, 23 Aug 2011 22:14:15 +0200 Subject: [PATCH] Live update of current time display --- Medianno/MADocWindow.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Medianno/MADocWindow.mm b/Medianno/MADocWindow.mm index 40017cd..de54e52 100644 --- a/Medianno/MADocWindow.mm +++ b/Medianno/MADocWindow.mm @@ -98,9 +98,11 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; currentMovie = [[QTMovie alloc] initWithURL:mediaURL error:nil]; currentMovieTitle = [currentMedia name]; } else { - currentMovie = nil; - currentMovieTitle = @""; + currentMovie = nil; + currentMovieTitle = @""; } + lastMovieTime = QTMakeTime(-1, 600); + [self updateMovieTime:nil]; } [self moviePanelDidAppear]; } @@ -325,7 +327,8 @@ static NSTimeInterval sLastSkip = 0.0; [currentMovie setCurrentTime:current]; sLastSkip *= 1.1; [NSRunLoop cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetSkipFactor:) object:self]; - [self performSelector:@selector(resetSkipFactor:) withObject:self afterDelay:1.0]; + [self performSelector:@selector(resetSkipFactor:) withObject:self afterDelay:0.5]; + [self updateMovieTime:nil]; } - (IBAction)mediaSkipBackward:(id)sender