Changeset 5521
- Timestamp:
- 05/11/08 19:42:45 (5 days ago)
- Files:
-
- Spiral/trunk/SPApplicationController.m (modified) (2 diffs)
- Spiral/trunk/SPMovieController.h (modified) (1 diff)
- Spiral/trunk/SPMovieController.m (modified) (20 diffs)
- Spiral/trunk/SPPS3Remote.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Spiral/trunk/SPApplicationController.m
r5518 r5521 131 131 132 132 case SPRemotePause: 133 [movieController stop];133 [movieController pause]; 134 134 break; 135 135 … … 166 166 167 167 case SPRemoteStepForward: 168 [movieController s tepForward];168 [movieController skipTime:[SPMovieController skipTimeIntervalForKey:NSUpArrowFunctionKey]]; 169 169 break; 170 170 171 171 case SPRemoteStepBackward: 172 [movieController s tepBackward];172 [movieController skipTime:[SPMovieController skipTimeIntervalForKey:NSDownArrowFunctionKey]]; 173 173 break; 174 174 Spiral/trunk/SPMovieController.h
r5519 r5521 157 157 - (void)stepForward; 158 158 - (void)stepBackward; 159 - (void)skipTime:(NSTimeInterval)timeInterval; 160 - (void)pause; 159 161 - (void)stop; 160 162 - (void)invalidate; Spiral/trunk/SPMovieController.m
r5519 r5521 42 42 - (void)_adjustOverlayImageView; 43 43 - (void)_showStatusOverlayForSkipTimeInterval:(NSTimeInterval)timeInterval; 44 - (void)_flashLoadingStatusOverlayString:(NSString *)string;45 - (void)_flashStatusOverlayString:(NSString *)string;46 - (void)_flashTimeOverlayString:(NSString *)string;47 44 - (void)_flashOverlayString:(NSString *)string textField:(NSTextField *)textField; 48 45 - (void)_setOverlayString:(NSString *)string textField:(NSTextField *)textField; 46 - (void)_flashOverlayImage:(NSImage *)image; 47 - (void)_setOverlayImage:(NSImage *)image; 49 48 - (void)_clearOverlay; 50 - (void)_flashOverlayImage:(NSImage *)image;51 - (void)_flashOverlayImage:(NSImage *)image string:(NSString *)string;52 - (void)_setOverlayImage:(NSImage *)image string:(NSString *)string;53 49 - (void)_hideOverlayWindow; 54 50 - (void)_animateHideOverlayTextField:(NSTextField *)textField; … … 161 157 if(timeInterval > 0.0) { 162 158 [self _flashOverlayString:[NSSWF:@"%.0fs", fabs(timeInterval)] textField:_overlayStatusTextField]; 163 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipForward"] string:[NSSWF:@"%.0fs", fabs(timeInterval)]];159 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipForward"]]; 164 160 } 165 161 else if(timeInterval < 0.0) { 166 162 [self _flashOverlayString:[NSSWF:@"%.0fs", fabs(timeInterval)] textField:_overlayStatusTextField]; 167 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipBack"] string:[NSSWF:@"%.0fs", fabs(timeInterval)]];163 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipBack"]]; 168 164 } 169 165 else if(rate == 1.0) { … … 177 173 else if(rate > 1.0) { 178 174 [self _setOverlayString:[NSSWF:@"%.0fx", fabs(rate)] textField:_overlayStatusTextField]; 179 [self _setOverlayImage:[NSImage imageNamed:@"OverlayFastForward"] string:[NSSWF:@"%.0fx", fabs(rate)]];175 [self _setOverlayImage:[NSImage imageNamed:@"OverlayFastForward"]]; 180 176 } 181 177 else if(rate < 0.0) { 182 178 [self _setOverlayString:[NSSWF:@"%.0fx", fabs(rate)] textField:_overlayStatusTextField]; 183 [self _setOverlayImage:[NSImage imageNamed:@"OverlayRewind"] string:[NSSWF:@"%.0fx", fabs(rate)]]; 184 } 185 186 if(rate > 1.0 || rate < 0.0) { 187 NSLog(@"set"); 179 [self _setOverlayImage:[NSImage imageNamed:@"OverlayRewind"]]; 180 } 181 182 if(rate > 1.0 || rate < 0.0) 188 183 [self _setOverlayString:[self _currentTimeString] textField:_overlayTimeTextField]; 189 } else { 190 NSLog(@"flash"); 191 [self _flashTimeOverlayString:[self _currentTimeString]]; 192 } 193 } 194 195 196 197 - (void)_flashLoadingStatusOverlayString:(NSString *)string { 198 [self _flashOverlayString:string textField:_overlayLoadingStatusTextField]; 199 } 200 201 202 203 - (void)_flashStatusOverlayString:(NSString *)string { 204 [self _flashOverlayString:string textField:_overlayStatusTextField]; 205 } 206 207 208 209 - (void)_flashTimeOverlayString:(NSString *)string { 210 [self _flashOverlayString:string textField:_overlayTimeTextField]; 184 else 185 [self _flashOverlayString:[self _currentTimeString] textField:_overlayTimeTextField]; 211 186 } 212 187 … … 227 202 228 203 [textField setAttributedStringValue:[NSAttributedString attributedStringWithString:string attributes:attributes]]; 229 [textField setAlphaValue:1.0]; 204 205 [_overlayWindow setAlphaValue:1.0]; 206 [[textField animator] setAlphaValue:1.0]; 230 207 } 231 208 … … 233 210 234 211 - (void)_flashOverlayImage:(NSImage *)image { 235 [self _flashOverlayImage:image string:NULL]; 236 } 237 238 239 240 - (void)_flashOverlayImage:(NSImage *)image string:(NSString *)string { 241 [self _setOverlayImage:image string:string]; 212 [self _setOverlayImage:image]; 242 213 243 214 [self performSelectorOnce:@selector(_animateHideOverlayImage) afterDelay:2.0]; … … 246 217 247 218 248 - (void)_setOverlayImage:(NSImage *)image string:(NSString *)string{219 - (void)_setOverlayImage:(NSImage *)image { 249 220 [_overlayImageView setImage:image]; 250 221 251 222 [self _adjustOverlayImageView]; 252 223 253 [_overlayImageView setAlphaValue:1.0]; 224 [_overlayWindow setAlphaValue:1.0]; 225 [[_overlayImageView animator] setAlphaValue:1.0]; 254 226 } 255 227 … … 266 238 267 239 - (void)_hideOverlayWindow { 268 [_overlayWindow setAlphaValue:0.0]; 240 [_overlayImageView setAlphaValue:0.0]; 241 [_overlayLoadingStatusTextField setAlphaValue:0.0]; 242 [_overlayStatusTextField setAlphaValue:0.0]; 243 [_overlayTimeTextField setAlphaValue:0.0]; 269 244 270 245 [self _clearOverlay]; … … 390 365 - (void)_updateTrackLoadingProgress { 391 366 NSArray *tracks; 367 NSString *string; 392 368 QTTrack *track; 393 369 QTTimeRange range; … … 414 390 415 391 if(_fullscreenWindow && _trackLoadingProgress < 1.0 && [_movie rate] == 0.0) { 416 [self _flashLoadingStatusOverlayString: 417 [NSSWF:NSLS(@"Loading Tracks: %.0f%%", @"Loading tracks overlay"), _trackLoadingProgress * 100.0]]; 392 string = [NSSWF:NSLS(@"Loading Tracks: %.0f%%", @"Loading tracks overlay"), _trackLoadingProgress * 100.0]; 393 394 [self _flashOverlayString:string textField:_overlayLoadingStatusTextField]; 418 395 } 419 396 … … 752 729 753 730 if([[_overlayLoadingStatusTextField stringValue] length] > 0) 754 [self _flash LoadingStatusOverlayString:[_overlayLoadingStatusTextField stringValue]];731 [self _flashOverlayString:[_overlayLoadingStatusTextField stringValue] textField:_overlayLoadingStatusTextField]; 755 732 756 733 if([[_overlayStatusTextField stringValue] length] > 0) 757 [self _flash StatusOverlayString:[_overlayStatusTextField stringValue]];734 [self _flashOverlayString:[_overlayStatusTextField stringValue] textField:_overlayStatusTextField]; 758 735 759 736 if([[_overlayTimeTextField stringValue] length] > 0) 760 [self _flash TimeOverlayString:[_overlayTimeTextField stringValue]];737 [self _flashOverlayString:[_overlayTimeTextField stringValue] textField:_overlayTimeTextField]; 761 738 762 739 [self _adjustOverlayTextFields]; … … 838 815 timeInterval = [[self class] skipTimeIntervalForKey:key]; 839 816 840 [self setCurrentTime:[self currentTime] + timeInterval]; 841 842 [self _showStatusOverlayForSkipTimeInterval:timeInterval]; 817 [self skipTime:timeInterval]; 843 818 break; 844 819 … … 1363 1338 - (void)stepBackward { 1364 1339 [_movie stepBackward]; 1365 1340 } 1341 1342 1343 1344 - (void)skipTime:(NSTimeInterval)timeInterval { 1345 [self setCurrentTime:[self currentTime] + timeInterval]; 1346 1347 [self _showStatusOverlayForSkipTimeInterval:timeInterval]; 1348 } 1349 1350 1351 1352 - (void)pause { 1353 [_movie stop]; 1354 1355 [self showStatusOverlay]; 1366 1356 } 1367 1357 … … 1370 1360 - (void)stop { 1371 1361 [_movie stop]; 1362 1363 [self _animateHideOverlayTextField:_overlayStatusTextField]; 1364 [self _flashOverlayImage:[NSImage imageNamed:@"OverlayStop"]]; 1365 [self _flashOverlayString:[self _currentTimeString] textField:_overlayTimeTextField]; 1372 1366 } 1373 1367 … … 1482 1476 1483 1477 - (void)cycleAudioTracksForwards:(BOOL)forwards { 1478 NSString *string; 1484 1479 NSUInteger count, audioTrack; 1485 1480 … … 1504 1499 } 1505 1500 1506 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"), 1507 [[self audioTrackNames] objectAtIndex:[self audioTrack]]]]; 1501 string = [NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"), 1502 [[self audioTrackNames] objectAtIndex:[self audioTrack]]]; 1503 1504 [self _flashOverlayString:string textField:_overlayStatusTextField]; 1508 1505 } 1509 1506 … … 1511 1508 1512 1509 - (void)cycleSubtitleTracksForwards:(BOOL)forwards { 1510 NSString *string; 1513 1511 NSUInteger count, subtitleTrack; 1514 1512 … … 1533 1531 } 1534 1532 1535 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"), 1536 [[self subtitleTrackNames] objectAtIndex:[self subtitleTrack]]]]; 1533 string = [NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"), 1534 [[self subtitleTrackNames] objectAtIndex:[self subtitleTrack]]]; 1535 1536 [self _flashOverlayString:string textField:_overlayStatusTextField]; 1537 1537 } 1538 1538 … … 1540 1540 1541 1541 - (void)cycleAspectRatiosForwards:(BOOL)forwards { 1542 NSString *string; 1542 1543 SPAspectRatio aspectRatio; 1543 1544 … … 1558 1559 [self setAspectRatio:aspectRatio]; 1559 1560 1560 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"), 1561 [[[self class] aspectRatioNames] objectAtIndex:[self aspectRatio]]]]; 1561 string = [NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"), 1562 [[[self class] aspectRatioNames] objectAtIndex:[self aspectRatio]]]; 1563 1564 [self _flashOverlayString:string textField:_overlayStatusTextField]; 1562 1565 } 1563 1566 … … 1731 1734 [data writeToFile:[path stringByExpandingTildeInPath] atomically:YES]; 1732 1735 1733 [self _flash StatusOverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay")];1736 [self _flashOverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay") textField:_overlayStatusTextField]; 1734 1737 } 1735 1738 Spiral/trunk/SPPS3Remote.m
r5517 r5521 173 173 174 174 case SPPS3RemoteButtonUp: 175 return SPRemoteUp; 175 if(context == SPRemotePlaylist || context == SPRemoteDrillView) 176 return SPRemoteUp; 176 177 break; 177 178 178 179 case SPPS3RemoteButtonDown: 179 return SPRemoteDown; 180 if(context == SPRemotePlaylist || context == SPRemoteDrillView) 181 return SPRemoteDown; 180 182 break; 181 183 182 184 case SPPS3RemoteButtonLeft: 183 return SPRemoteLeft; 185 if(context == SPRemotePlaylist || context == SPRemoteDrillView) 186 return SPRemoteLeft; 184 187 break; 185 188 186 189 case SPPS3RemoteButtonRight: 187 return SPRemoteRight; 190 if(context == SPRemotePlaylist || context == SPRemoteDrillView) 191 return SPRemoteRight; 188 192 break; 189 193 190 194 case SPPS3RemoteButtonEnter: 191 return SPRemoteEnter; 195 if(context == SPRemotePlaylist || context == SPRemoteDrillView) 196 return SPRemoteEnter; 192 197 break; 193 198
