Changeset 5519
- Timestamp:
- 05/11/08 17:18:10 (5 days ago)
- Files:
-
- Spiral/trunk/English.lproj/Credits.rtf (modified) (1 diff)
- Spiral/trunk/English.lproj/Overlay.nib/classes.nib (modified) (1 diff)
- Spiral/trunk/English.lproj/Overlay.nib/info.nib (modified) (1 diff)
- Spiral/trunk/English.lproj/Overlay.nib/keyedobjects.nib (modified) (previous)
- Spiral/trunk/OverlayFastForward.tiff (added)
- Spiral/trunk/OverlayNext.tiff (added)
- Spiral/trunk/OverlayPause.tiff (added)
- Spiral/trunk/OverlayPlay.tiff (added)
- Spiral/trunk/OverlayPrevious.tiff (added)
- Spiral/trunk/OverlayRewind.tiff (added)
- Spiral/trunk/OverlaySkipBack.tiff (added)
- Spiral/trunk/OverlaySkipForward.tiff (added)
- Spiral/trunk/OverlayStop.tiff (added)
- Spiral/trunk/SPDrillController.m (modified) (1 diff)
- Spiral/trunk/SPMovieController.h (modified) (3 diffs)
- Spiral/trunk/SPMovieController.m (modified) (26 diffs)
- Spiral/trunk/SPPlayerController.m (modified) (4 diffs)
- Spiral/trunk/SPPreferencesController.m (modified) (4 diffs)
- Spiral/trunk/Spiral.xcodeproj/project.pbxproj (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Spiral/trunk/English.lproj/Credits.rtf
r5099 r5519 1 {\rtf1\ mac\ansicpg10000\cocoartf824\cocoasubrtf4202 {\fonttbl\f0\fnil\fcharset 77 LucidaGrande-Bold;\f1\fnil\fcharset77LucidaGrande;}1 {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270 2 {\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 3 3 {\colortbl;\red255\green255\blue255;} 4 4 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc 5 5 6 6 \f0\b\fs22 \cf0 Created By 7 \ f1\b0 \7 \b0 \ 8 8 Axel Andersson\ 9 9 \ 10 10 11 \f0\b Apple Remote Support 12 \f1\b0 \ 11 \b Icons 12 \b0 \ 13 \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\qc\pardirnatural 14 \cf0 Christine Larsson\ 15 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc 16 \cf0 \ 17 18 \b Apple Remote Support 19 \b0 \ 13 20 \pard\tx480\tx960\tx1440\tx1920\tx2400\tx2880\tx3360\tx3840\tx4320\tx4800\tx5280\tx5760\tx6240\tx6720\tx7200\tx7680\tx8160\tx8640\tx9120\tx9600\tx10080\tx10560\tx11040\tx11520\tx12000\tx12480\tx12960\tx13440\tx13920\tx14400\tx14880\tx15360\tx15840\tx16320\tx16800\tx17280\tx17760\tx18240\tx18720\tx19200\tx19680\tx20160\tx20640\tx21120\tx21600\tx22080\tx22560\tx23040\tx23520\tx24000\tx24480\tx24960\tx25440\tx25920\tx26400\tx26880\tx27360\tx27840\tx28320\tx28800\tx29280\tx29760\tx30240\tx30720\tx31200\tx31680\tx32160\tx32640\tx33120\tx33600\tx34080\tx34560\tx35040\tx35520\tx36000\tx36480\tx36960\tx37440\tx37920\tx38400\tx38880\tx39360\tx39840\tx40320\tx40800\tx41280\tx41760\tx42240\tx42720\tx43200\tx43680\tx44160\tx44640\tx45120\tx45600\tx46080\tx46560\tx47040\tx47520\tx48000\qc\pardirnatural 14 21 \cf0 Martin Kahr\ Spiral/trunk/English.lproj/Overlay.nib/classes.nib
r5121 r5519 129 129 <key>_nextButton</key> 130 130 <string>NSButton</string> 131 <key>_overlayImageView</key> 132 <string>NSImageView</string> 133 <key>_overlayLoadingStatusTextField</key> 134 <string>NSTextField</string> 135 <key>_overlayStatusTextField</key> 136 <string>NSTextField</string> 131 137 <key>_overlayTextField</key> 138 <string>NSTextField</string> 139 <key>_overlayTimeTextField</key> 140 <string>NSTextField</string> 141 <key>_overlayTopTextField</key> 132 142 <string>NSTextField</string> 133 143 <key>_overlayView</key> Spiral/trunk/English.lproj/Overlay.nib/info.nib
r5475 r5519 5 5 <key>IBFramework Version</key> 6 6 <string>629</string> 7 <key>IBLastKnownRelativeProjectPath</key> 8 <string>../../Spiral.xcodeproj</string> 7 9 <key>IBOldestOS</key> 8 10 <integer>5</integer> Spiral/trunk/SPDrillController.m
r5481 r5519 70 70 [_movieView setFrame:frame]; 71 71 [_overlayWindow setFrame:frame display:YES]; 72 [_movieController adjustOverlayWindow]; 72 73 [[_movieView window] display]; 73 74 } Spiral/trunk/SPMovieController.h
r5493 r5519 70 70 71 71 IBOutlet NSView *_overlayView; 72 IBOutlet NSTextField *_overlayTextField; 72 IBOutlet NSImageView *_overlayImageView; 73 IBOutlet NSTextField *_overlayLoadingStatusTextField; 74 IBOutlet NSTextField *_overlayStatusTextField; 75 IBOutlet NSTextField *_overlayTimeTextField; 73 76 74 77 IBOutlet NSView *_hudView; … … 160 163 - (BOOL)isInFullscreen; 161 164 - (void)orderFrontFullscreenHUDWindow; 165 - (void)adjustOverlayWindow; 162 166 - (void)resumePlaying; 163 167 - (float)rate; … … 165 169 - (void)cycleSubtitleTracksForwards:(BOOL)forwards; 166 170 - (void)cycleAspectRatiosForwards:(BOOL)forwards; 167 - (void) flashCurrentTime;171 - (void)showStatusOverlay; 168 172 - (BOOL)openNext; 169 173 - (BOOL)openNextAndStartPlaying:(BOOL)startPlaying; Spiral/trunk/SPMovieController.m
r5493 r5519 37 37 @interface SPMovieController(Private) 38 38 39 - (void)_flashOverlayString:(NSString *)string; 40 - (void)_flashOverlayString:(NSString *)string hold:(BOOL)hold; 41 - (void)_animateHideOverlayWindow; 39 + (NSDictionary *)_overlayStringAttributesForTextField:(NSTextField *)textField; 40 - (CGFloat)_overlayViewHeight; 41 - (void)_adjustOverlayTextFields; 42 - (void)_adjustOverlayImageView; 43 - (void)_showStatusOverlayForSkipTimeInterval:(NSTimeInterval)timeInterval; 44 - (void)_flashLoadingStatusOverlayString:(NSString *)string; 45 - (void)_flashStatusOverlayString:(NSString *)string; 46 - (void)_flashTimeOverlayString:(NSString *)string; 47 - (void)_flashOverlayString:(NSString *)string textField:(NSTextField *)textField; 48 - (void)_setOverlayString:(NSString *)string textField:(NSTextField *)textField; 49 - (void)_clearOverlay; 50 - (void)_flashOverlayImage:(NSImage *)image; 51 - (void)_flashOverlayImage:(NSImage *)image string:(NSString *)string; 52 - (void)_setOverlayImage:(NSImage *)image string:(NSString *)string; 53 - (void)_hideOverlayWindow; 54 - (void)_animateHideOverlayTextField:(NSTextField *)textField; 55 - (void)_animateHideOverlayImage; 42 56 43 57 - (void)_loadAttributes; … … 52 66 - (void)_updateTimeTextFieldsForInterval:(NSTimeInterval)interval; 53 67 68 - (NSString *)_currentTimeString; 69 54 70 @end 55 71 … … 57 73 @implementation SPMovieController(Private) 58 74 59 - (void)_flashOverlayString:(NSString *)string { 60 [self _flashOverlayString:string hold:NO]; 61 } 62 63 64 65 - (void)_flashOverlayString:(NSString *)string hold:(BOOL)hold { 66 NSMutableParagraphStyle *style; 67 NSFont *font; 68 NSDictionary *attributes; 69 float size; 70 71 if([string length] > 0) { 72 style = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; 73 [style setAlignment:[_overlayTextField alignment]]; 74 75 size = floor([_movieView frame].size.height / 16.0); 76 font = [NSFont boldSystemFontOfSize:WIClamp(size, 18.0, 48.0)]; 77 78 attributes = [NSDictionary dictionaryWithObjectsAndKeys: 79 [NSNumber numberWithDouble:-4.0], 80 NSStrokeWidthAttributeName, 81 [NSColor blackColor], 82 NSStrokeColorAttributeName, 83 font, 84 NSFontAttributeName, 85 [NSColor whiteColor], 86 NSForegroundColorAttributeName, 87 style, 88 NSParagraphStyleAttributeName, 89 NULL]; 90 91 [_overlayTextField setAttributedStringValue: 92 [NSAttributedString attributedStringWithString:string 93 attributes:attributes]]; 94 95 [[_overlayTextField window] setAlphaValue:1.0]; 96 97 [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_animateHideOverlayWindow) object:NULL]; 98 99 if(!hold) 100 [self performSelectorOnce:@selector(_animateHideOverlayWindow) afterDelay:2.0]; 101 } 75 + (NSDictionary *)_overlayStringAttributesForTextField:(NSTextField *)textField { 76 NSMutableParagraphStyle *style; 77 78 style = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; 79 [style setAlignment:[textField alignment]]; 80 81 return [NSDictionary dictionaryWithObjectsAndKeys: 82 [NSNumber numberWithDouble:-4.0], 83 NSStrokeWidthAttributeName, 84 [NSColor blackColor], 85 NSStrokeColorAttributeName, 86 [textField font], 87 NSFontAttributeName, 88 [NSColor whiteColor], 89 NSForegroundColorAttributeName, 90 style, 91 NSParagraphStyleAttributeName, 92 NULL]; 93 } 94 95 96 97 - (CGFloat)_overlayViewHeight { 98 CGFloat height; 99 100 height = floor([_movieView frame].size.height / 16.0); 101 102 return WIClamp(height, 18.0, 48.0); 103 } 104 105 106 107 - (void)_adjustOverlayTextFields { 108 NSFont *font; 109 NSRect frame; 110 NSSize size; 111 CGFloat height; 112 113 height = [self _overlayViewHeight]; 114 size = [_overlayWindow frame].size; 115 font = [NSFont boldSystemFontOfSize:height]; 116 117 [_overlayLoadingStatusTextField setFont:font]; 118 [_overlayStatusTextField setFont:font]; 119 [_overlayTimeTextField setFont:font]; 120 121 frame = [_overlayTimeTextField frame]; 122 frame.origin.y = size.height - 25.0 - frame.size.height - height; 123 [_overlayTimeTextField setFrame:frame]; 124 } 125 126 127 128 - (void)_adjustOverlayImageView { 129 NSDictionary *attributes; 130 NSRect frame; 131 NSSize size, imageSize; 132 CGFloat height; 133 134 height = [self _overlayViewHeight]; 135 size = [_overlayWindow frame].size; 136 imageSize = [[_overlayImageView image] size]; 137 138 frame = [_overlayImageView frame]; 139 frame.size.height = height - 8.0; 140 frame.size.width = (imageSize.width > 0.0) ? ((imageSize.width / imageSize.height) * frame.size.height) : frame.size.height; 141 frame.size.width += 5.0; 142 frame.origin.x = size.width - 25.0 - frame.size.width; 143 frame.origin.y = size.height - 28.0 - frame.size.height; 144 145 if([_overlayStatusTextField alphaValue] > 0.0) { 146 attributes = [[self class] _overlayStringAttributesForTextField:_overlayStatusTextField]; 147 148 frame.origin.x -= [[_overlayStatusTextField stringValue] sizeWithAttributes:attributes].width + 15.0; 149 } 150 151 [_overlayImageView setFrame:frame]; 152 } 153 154 155 156 - (void)_showStatusOverlayForSkipTimeInterval:(NSTimeInterval)timeInterval { 157 float rate; 158 159 rate = [_movie rate]; 160 161 if(timeInterval > 0.0) { 162 [self _flashOverlayString:[NSSWF:@"%.0fs", fabs(timeInterval)] textField:_overlayStatusTextField]; 163 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipForward"] string:[NSSWF:@"%.0fs", fabs(timeInterval)]]; 164 } 165 else if(timeInterval < 0.0) { 166 [self _flashOverlayString:[NSSWF:@"%.0fs", fabs(timeInterval)] textField:_overlayStatusTextField]; 167 [self _flashOverlayImage:[NSImage imageNamed:@"OverlaySkipBack"] string:[NSSWF:@"%.0fs", fabs(timeInterval)]]; 168 } 169 else if(rate == 1.0) { 170 [self _animateHideOverlayTextField:_overlayStatusTextField]; 171 [self _flashOverlayImage:[NSImage imageNamed:@"OverlayPlay"]]; 172 } 173 else if(rate == 0.0) { 174 [self _animateHideOverlayTextField:_overlayStatusTextField]; 175 [self _flashOverlayImage:[NSImage imageNamed:@"OverlayPause"]]; 176 } 177 else if(rate > 1.0) { 178 [self _setOverlayString:[NSSWF:@"%.0fx", fabs(rate)] textField:_overlayStatusTextField]; 179 [self _setOverlayImage:[NSImage imageNamed:@"OverlayFastForward"] string:[NSSWF:@"%.0fx", fabs(rate)]]; 180 } 181 else if(rate < 0.0) { 182 [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"); 188 [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]; 211 } 212 213 214 215 - (void)_flashOverlayString:(NSString *)string textField:(NSTextField *)textField { 216 [self _setOverlayString:string textField:textField]; 217 218 [self performSelectorOnce:@selector(_animateHideOverlayTextField:) withObject:textField afterDelay:2.0]; 219 } 220 221 222 223 - (void)_setOverlayString:(NSString *)string textField:(NSTextField *)textField { 224 NSDictionary *attributes; 225 226 attributes = [[self class] _overlayStringAttributesForTextField:textField]; 227 228 [textField setAttributedStringValue:[NSAttributedString attributedStringWithString:string attributes:attributes]]; 229 [textField setAlphaValue:1.0]; 230 } 231 232 233 234 - (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]; 242 243 [self performSelectorOnce:@selector(_animateHideOverlayImage) afterDelay:2.0]; 244 } 245 246 247 248 - (void)_setOverlayImage:(NSImage *)image string:(NSString *)string { 249 [_overlayImageView setImage:image]; 250 251 [self _adjustOverlayImageView]; 252 253 [_overlayImageView setAlphaValue:1.0]; 254 } 255 256 257 258 - (void)_clearOverlay { 259 [_overlayImageView setImage:NULL]; 260 [_overlayLoadingStatusTextField setStringValue:@""]; 261 [_overlayStatusTextField setStringValue:@""]; 262 [_overlayTimeTextField setStringValue:@""]; 102 263 } 103 264 … … 106 267 - (void)_hideOverlayWindow { 107 268 [_overlayWindow setAlphaValue:0.0]; 108 } 109 110 111 112 - (void)_animateHideOverlayWindow { 113 [[_overlayWindow animator] setAlphaValue:0.0]; 269 270 [self _clearOverlay]; 271 } 272 273 274 275 - (void)_animateHideOverlayTextField:(NSTextField *)textField { 276 [[textField animator] setAlphaValue:0.0]; 277 278 [textField performSelector:@selector(setStringValue:) withObject:@"" afterDelay:[[NSAnimationContext currentContext] duration]]; 279 } 280 281 282 283 - (void)_animateHideOverlayImage { 284 [[_overlayImageView animator] setAlphaValue:0.0]; 285 286 [_overlayImageView performSelector:@selector(setImage:) withObject:NULL afterDelay:[[NSAnimationContext currentContext] duration]]; 114 287 } 115 288 … … 240 413 } 241 414 242 if(_fullscreenWindow && _trackLoadingProgress < 1.0) 243 [self _flashOverlayString:[NSSWF:NSLS(@"Loading Tracks: %.0f%%", @"Loading tracks overlay"), _trackLoadingProgress * 100.0]]; 415 if(_fullscreenWindow && _trackLoadingProgress < 1.0 && [_movie rate] == 0.0) { 416 [self _flashLoadingStatusOverlayString: 417 [NSSWF:NSLS(@"Loading Tracks: %.0f%%", @"Loading tracks overlay"), _trackLoadingProgress * 100.0]]; 418 } 244 419 245 420 [_trackingSlider setProgressDoubleValue:_trackLoadingProgress]; … … 319 494 [_hudElapsedTimeTextField setStringValue:elapsed]; 320 495 [_hudRemainingTimeTextField setStringValue:remaining]; 321 } 322 496 497 if([_overlayTimeTextField alphaValue] > 0.0) 498 [self _setOverlayString:[self _currentTimeString] textField:_overlayTimeTextField]; 499 } 500 501 502 503 #pragma mark - 504 505 - (NSString *)_currentTimeString { 506 return [NSSWF:NSLS(@"%@/%@", @"Current time overlay"), 507 [[self class] shortStringForTimeInterval:[self currentTime]], 508 [[self class] shortStringForTimeInterval:[self duration]]]; 509 } 510 323 511 @end 324 512 … … 541 729 542 730 - (void)windowWillClose:(NSNotification *)notification { 731 [NSObject cancelPreviousPerformRequestsWithTarget:self]; 732 543 733 [self stop]; 544 734 [self setMovie:NULL]; … … 548 738 549 739 - (void)windowDidResize:(NSNotification *)notification { 550 NSWindow *window;551 NSSize size;740 NSWindow *window; 741 NSSize size; 552 742 553 743 window = [notification object]; … … 555 745 if(window == [_movieView window]) { 556 746 size = [window frame].size; 747 557 748 _currentMovieSize.width = size.width; 558 749 _currentMovieSize.height = size.height - (size.height - [_movieView frame].size.height); 559 750 560 751 [[NSNotificationCenter defaultCenter] postNotificationName:SPMovieControllerAttributesChangedNotification object:self]; 561 } 562 563 if([[_overlayTextField stringValue] length] > 0) 564 [self _flashOverlayString:[_overlayTextField stringValue]]; 752 753 if([[_overlayLoadingStatusTextField stringValue] length] > 0) 754 [self _flashLoadingStatusOverlayString:[_overlayLoadingStatusTextField stringValue]]; 755 756 if([[_overlayStatusTextField stringValue] length] > 0) 757 [self _flashStatusOverlayString:[_overlayStatusTextField stringValue]]; 758 759 if([[_overlayTimeTextField stringValue] length] > 0) 760 [self _flashTimeOverlayString:[_overlayTimeTextField stringValue]]; 761 762 [self _adjustOverlayTextFields]; 763 [self _adjustOverlayImageView]; 764 } 565 765 } 566 766 … … 608 808 - (void)movieView:(SPQTMovieView *)movieView didReceiveEvent:(NSEvent *)event { 609 809 NSEventType type; 810 NSTimeInterval timeInterval; 610 811 unichar key; 611 812 … … 635 836 case NSPageDownFunctionKey: 636 837 case NSPageUpFunctionKey: 637 [self setCurrentTime:[self currentTime] + [[self class] skipTimeIntervalForKey:key]];838 timeInterval = [[self class] skipTimeIntervalForKey:key]; 638 839 639 [self flashCurrentTime]; 840 [self setCurrentTime:[self currentTime] + timeInterval]; 841 842 [self _showStatusOverlayForSkipTimeInterval:timeInterval]; 640 843 break; 641 844 … … 643 846 [self setCurrentTime:0.0]; 644 847 645 [self flashCurrentTime];848 [self showStatusOverlay]; 646 849 break; 647 850 … … 649 852 [self setCurrentTime:[self duration]]; 650 853 651 [self flashCurrentTime];854 [self showStatusOverlay]; 652 855 break; 653 856 … … 677 880 678 881 case 't': 679 [self flashCurrentTime];882 [self showStatusOverlay]; 680 883 break; 681 884 } … … 847 1050 [_movieView setMovie:_movie]; 848 1051 849 [_overlayTextField setStringValue:@""]; 1052 [self _clearOverlay]; 1053 850 1054 [_hudNameTextField setStringValue:[[[_movie attributeForKey:QTMovieURLAttribute] path] lastPathComponent]]; 851 1055 … … 1119 1323 [_movie stop]; 1120 1324 } 1325 1326 [self showStatusOverlay]; 1121 1327 } 1122 1328 … … 1129 1335 [_movie setRate:rate]; 1130 1336 1131 if(rate > 1.0) 1132 [self _flashOverlayString:[NSSWF:NSLS(@"Fast Forward: %.0fx", @"Fast forward overlay"), fabs(rate)] hold:YES]; 1133 else if(rate < 0.0) 1134 [self _flashOverlayString:[NSSWF:NSLS(@"Rewind: %.0fx", @"Rewind overlay"), fabs(rate)] hold:YES]; 1135 else 1136 [self _animateHideOverlayWindow]; 1337 [self showStatusOverlay]; 1137 1338 } 1138 1339 … … 1193 1394 _fullscreenDelegate = NULL; 1194 1395 _fullscreenSelector = NULL; 1195 1196 [self _hideOverlayWindow];1197 1396 } 1198 1397 … … 1207 1406 - (void)orderFrontFullscreenHUDWindow { 1208 1407 [_fullscreenWindow orderFrontHUDWindow]; 1408 } 1409 1410 1411 1412 - (void)adjustOverlayWindow { 1413 [self _adjustOverlayTextFields]; 1414 [self _adjustOverlayImageView]; 1209 1415 } 1210 1416 … … 1298 1504 } 1299 1505 1300 [self _flash OverlayString:[NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"),1506 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"), 1301 1507 [[self audioTrackNames] objectAtIndex:[self audioTrack]]]]; 1302 1508 } … … 1327 1533 } 1328 1534 1329 [self _flash OverlayString:[NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"),1535 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"), 1330 1536 [[self subtitleTrackNames] objectAtIndex:[self subtitleTrack]]]]; 1331 1537 } … … 1352 1558 [self setAspectRatio:aspectRatio]; 1353 1559 1354 [self _flash OverlayString:[NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"),1560 [self _flashStatusOverlayString:[NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"), 1355 1561 [[[self class] aspectRatioNames] objectAtIndex:[self aspectRatio]]]]; 1356 1562 } … … 1358 1564 1359 1565 1360 - (void)flashCurrentTime { 1361 [self _flashOverlayString:[NSSWF:NSLS(@"%@/%@", @"Current time overlay"), 1362 [[self class] shortStringForTimeInterval:[self currentTime]], 1363 [[self class] shortStringForTimeInterval:[self duration]]]]; 1566 - (void)showStatusOverlay { 1567 [self _showStatusOverlayForSkipTimeInterval:0.0]; 1364 1568 } 1365 1569 … … 1408 1612 } 1409 1613 1614 [self _flashOverlayImage:[NSImage imageNamed:@"OverlayPrevious"]]; 1615 1410 1616 if(_disablePlayingWhenOpened) { 1411 1617 [self playWhenTracksAreLoaded]; … … 1475 1681 continue; 1476 1682 } 1683 1684 [self _flashOverlayImage:[NSImage imageNamed:@"OverlayNext"]]; 1477 1685 1478 1686 if(_disablePlayingWhenOpened) { … … 1523 1731 [data writeToFile:[path stringByExpandingTildeInPath] atomically:YES]; 1524 1732 1525 [self _flash OverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay")];1733 [self _flashStatusOverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay")]; 1526 1734 } 1527 1735 Spiral/trunk/SPPlayerController.m
r5512 r5519 158 158 [_movieView setFrame:frame]; 159 159 [_overlayWindow setFrame:frame display:YES]; 160 [_movieController adjustOverlayWindow]; 160 161 [[_movieView window] display]; 161 162 } … … 217 218 [_overlayWindow setFrame:frame display:YES]; 218 219 [[self window] addChildWindow:_overlayWindow ordered:NSWindowAbove]; 220 [_movieController adjustOverlayWindow]; 219 221 220 222 _hudWindow = [[_movieController HUDWindow] retain]; … … 288 290 frame.size = [_movieView frame].size; 289 291 [_overlayWindow setFrame:frame display:YES]; 292 [_movieController adjustOverlayWindow]; 290 293 } 291 294 } … … 432 435 [_overlayWindow setFrame:frame display:YES]; 433 436 [[self window] addChildWindow:_overlayWindow ordered:NSWindowAbove]; 437 [_movieController adjustOverlayWindow]; 434 438 435 439 [_movieView retain]; Spiral/trunk/SPPreferencesController.m
r5472 r5519 135 135 selector:@selector(bluetoothRemoteDidConnect:) 136 136 name:SPBluetoothRemoteDidConnect]; 137 138 [[NSNotificationCenter defaultCenter] 139 addObserver:self 140 selector:@selector(bluetoothRemoteDidDisconnect:) 141 name:SPBluetoothRemoteDidDisconnect]; 137 142 138 143 return self; … … 182 187 remote = [notification object]; 183 188 184 NSLog(@"willconnect %@", remote);185 186 189 if(remote == [SPPS3Remote sharedRemote]) 187 190 [self _updatePS3RemoteStatus]; … … 196 199 197 200 remote = [notification object]; 198 199 NSLog(@"didconnect %@", remote);200 201 201 202 if(remote == [SPPS3Remote sharedRemote]) … … 207 208 208 209 210 - (void)bluetoothRemoteDidDisconnect:(NSNotification *)notification { 211 id remote; 212 213 remote = [notification object]; 214 215 if(remote == [SPPS3Remote sharedRemote]) 216 [self _updatePS3RemoteStatus]; 217 else if(remote == [SPWiiRemote sharedRemote]) 218 [self _updateWiiRemoteStatus]; 219 } 220 221 222 209 223 #pragma mark - 210 224 Spiral/trunk/Spiral.xcodeproj/project.pbxproj
r5481 r5519 136 136 A59649330CC14F90008728CB /* Next.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A596492F0CC14F8C008728CB /* Next.tiff */; }; 137 137 A59649340CC14F90008728CB /* Previous.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A59649300CC14F8C008728CB /* Previous.tiff */; }; 138 A5B5DAC60DD3AB1B00FF4BCE /* OverlayPlay.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DAC50DD3AB1B00FF4BCE /* OverlayPlay.tiff */; }; 139 A5B5DB040DD4F02100FF4BCE /* OverlayPause.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB030DD4F02100FF4BCE /* OverlayPause.tiff */; }; 140 A5B5DB0C0DD4F0F000FF4BCE /* OverlaySkipBack.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB050DD4F0F000FF4BCE /* OverlaySkipBack.tiff */; }; 141 A5B5DB0D0DD4F0F000FF4BCE /* OverlayPrevious.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB060DD4F0F000FF4BCE /* OverlayPrevious.tiff */; }; 142 A5B5DB0E0DD4F0F000FF4BCE /* OverlayRewind.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB070DD4F0F000FF4BCE /* OverlayRewind.tiff */; }; 143 A5B5DB0F0DD4F0F000FF4BCE /* OverlayNext.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB080DD4F0F000FF4BCE /* OverlayNext.tiff */; }; 144 A5B5DB100DD4F0F000FF4BCE /* OverlaySkipForward.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB090DD4F0F000FF4BCE /* OverlaySkipForward.tiff */; }; 145 A5B5DB110DD4F0F000FF4BCE /* OverlayFastForward.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB0A0DD4F0F000FF4BCE /* OverlayFastForward.tiff */; }; 146 A5B5DB120DD4F0F000FF4BCE /* OverlayStop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5B5DB0B0DD4F0F000FF4BCE /* OverlayStop.tiff */; }; 138 147 A5C7B6190CC7FB4E008FAF45 /* SPAppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = A5C7B6150CC7FB4C008FAF45 /* SPAppleRemote.m */; }; 139 148 A5C7C3930CC8132F008FAF45 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5C7C3920CC8132F008FAF45 /* IOKit.framework */; }; … … 337 346 A596492F0CC14F8C008728CB /* Next.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Next.tiff; sourceTree = "<group>"; }; 338 347 A59649300CC14F8C008728CB /* Previous.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Previous.tiff; sourceTree = "<group>"; }; 348 A5B5DAC50DD3AB1B00FF4BCE /* OverlayPlay.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayPlay.tiff; sourceTree = "<group>"; }; 349 A5B5DB030DD4F02100FF4BCE /* OverlayPause.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayPause.tiff; sourceTree = "<group>"; }; 350 A5B5DB050DD4F0F000FF4BCE /* OverlaySkipBack.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlaySkipBack.tiff; sourceTree = "<group>"; }; 351 A5B5DB060DD4F0F000FF4BCE /* OverlayPrevious.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayPrevious.tiff; sourceTree = "<group>"; }; 352 A5B5DB070DD4F0F000FF4BCE /* OverlayRewind.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayRewind.tiff; sourceTree = "<group>"; }; 353 A5B5DB080DD4F0F000FF4BCE /* OverlayNext.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayNext.tiff; sourceTree = "<group>"; }; 354 A5B5DB090DD4F0F000FF4BCE /* OverlaySkipForward.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlaySkipForward.tiff; sourceTree = "<group>"; }; 355 A5B5DB0A0DD4F0F000FF4BCE /* OverlayFastForward.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayFastForward.tiff; sourceTree = "<group>"; }; 356 A5B5DB0B0DD4F0F000FF4BCE /* OverlayStop.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OverlayStop.tiff; sourceTree = "<group>"; }; 339 357 A5C7B6150CC7FB4C008FAF45 /* SPAppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SPAppleRemote.m; sourceTree = "<group>"; }; 340 358 A5C7B6160CC7FB4C008FAF45 /* SPAppleRemote.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SPAppleRemote.h; sourceTree = "<group>"; }; … … 379 397 A50932DF083E9530006646D1 /* Cocoa.framework in Frameworks */, 380 398 A53901F40596A3E7000FBFD6 /* Carbon.framework in Frameworks */, 399 A5F518810DB669D7001BE2F8 /* IOBluetooth.framework in Frameworks */, 381 400 A5C7C3930CC8132F008FAF45 /* IOKit.framework in Frameworks */, 382 401 A596317F0CC00949008728CB /* QTKit.framework in Frameworks */, 383 402 775903650D103575001CBF86 /* Sparkle.framework in Frameworks */, 384 403 A5643D300A26056800ADF4F5 /* WiredAdditions.framework in Frameworks */, 385 A5F518810DB669D7001BE2F8 /* IOBluetooth.framework in Frameworks */,386 404 ); 387 405 runOnlyForDeploymentPostprocessing = 0; … … 424 442 isa = PBXGroup; 425 443 children = ( 426 A5F518800DB669D7001BE2F8 /* IOBluetooth.framework */,427 444 A53901F30596A3E7000FBFD6 /* Carbon.framework */, 428 445 A50932DE083E9530006646D1 /* Cocoa.framework */, 429 446 778F0DE20B64D45500E3CD47 /* CoreFoundation.framework */, 447 A5F518800DB669D7001BE2F8 /* IOBluetooth.framework */, 430 448 A5C7C3920CC8132F008FAF45 /* IOKit.framework */, 431 449 A596317E0CC00949008728CB /* QTKit.framework */, … … 595 613 A569CA600CCAAAD70046F90E /* HUDElapsedTimeBackground.tiff */, 596 614 A569C9690CCAA3FE0046F90E /* HUDExit.tiff */, 615 A569C9320CCAA1840046F90E /* HUDNext.tiff */, 616 A569C9310CCAA1840046F90E /* HUDPause.tiff */, 617 A569C9330CCAA1840046F90E /* HUDPlay.tiff */, 597 618 A569C9300CCAA1840046F90E /* HUDPrevious.tiff */, 598 A569C9310CCAA1840046F90E /* HUDPause.tiff */,599 A569C9320CCAA1840046F90E /* HUDNext.tiff */,600 A569C9330CCAA1840046F90E /* HUDPlay.tiff */,601 619 A569CA620CCAAADD0046F90E /* HUDRemainingTimeBackground.tiff */, 602 620 A569C9870CCAA5110046F90E /* HUDSliderKnob.tif */, 603 A596448F0CC0EC40008728CB /* LCDBackgroundRight.tiff */,604 621 A59644900CC0EC40008728CB /* LCDBackgroundCenter.tiff */, 605 622 A59644910CC0EC40008728CB /* LCDBackgroundLeft.tiff */, 623 A596448F0CC0EC40008728CB /* LCDBackgroundRight.tiff */, 606 624 A59638640CC0DA14008728CB /* LCDSliderKnob.tiff */, 607 625 A55CF34D0CC6AF38006F2DAB /* Minus.tiff */, 608 626 A596492F0CC14F8C008728CB /* Next.tiff */, 627 A5B5DB0A0DD4F0F000FF4BCE /* OverlayFastForward.tiff */, 628 A5B5DB080DD4F0F000FF4BCE /* OverlayNext.tiff */, 629 A5B5DB030DD4F02100FF4BCE /* OverlayPause.tiff */, 630 A5B5DAC50DD3AB1B00FF4BCE /* OverlayPlay.tiff */, 631 A5B5DB060DD4F0F000FF4BCE /* OverlayPrevious.tiff */, 632 A5B5DB070DD4F0F000FF4BCE /* OverlayRewind.tiff */, 633 A5B5DB050DD4F0F000FF4BCE /* OverlaySkipBack.tiff */, 634 A5B5DB090DD4F0F000FF4BCE /* OverlaySkipForward.tiff */, 635 A5B5DB0B0DD4F0F000FF4BCE /* OverlayStop.tiff */, 609 636 A596492E0CC14F8C008728CB /* Pause.tiff */, 610 637 A596492D0CC14F8C008728CB /* Play.tiff */, … … 614 641 A55CF3470CC6AF24006F2DAB /* Plus.tiff */, 615 642 A59649300CC14F8C008728CB /* Previous.tiff */, 643 A56D50FC0DB7BD0200F1B2EF /* RemoteConnected.tiff */, 644 A56D50FB0DB7BD0200F1B2EF /* RemoteNoDeviceFound.tiff */, 616 645 A56D50FA0DB7BD0200F1B2EF /* RemoteNotConnected.tiff */, 617 A56D50FB0DB7BD0200F1B2EF /* RemoteNoDeviceFound.tiff */,618 A56D50FC0DB7BD0200F1B2EF /* RemoteConnected.tiff */,619 646 A5697FF30CC97A950046F90E /* RepeatAll.tiff */, 620 647 A5697FDA0CC978230046F90E /* RepeatOff.tiff */, … … 849 876 77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */, 850 877 775BF1320CCF730100E93928 /* Drill.nib in Resources */, 878 A5F34DE00DB7FA03004C3DF6 /* DrillItem.nib in Resources */, 851 879 775BF86E0CD0C5B800E93928 /* HUD.nib in Resources */, 852 880 77A2722F0CC4D03A0040B352 /* Inspector.nib in Resources */, … … 856 884 A55CEF6E0CC69A70006F2DAB /* Playlist.nib in Resources */, 857 885 A596311E0CC00814008728CB /* Player.nib in Resources */, 858 A569CB210CCAB5640046F90E /* HUDBackground.tiff in Resources */,859 A569CA610CCAAAD70046F90E /* HUDElapsedTimeBackground.tiff in Resources */,860 A569C96A0CCAA3FE0046F90E /* HUDExit.tiff in Resources */,861 A569C9360CCAA1840046F90E /* HUDNext.tiff in Resources */,862 A569C9350CCAA1840046F90E /* HUDPause.tiff in Resources */,863 A569C9370CCAA1840046F90E /* HUDPlay.tiff in Resources */,864 A569C9340CCAA1840046F90E /* HUDPrevious.tiff in Resources */,865 A569CA630CCAAADD0046F90E /* HUDRemainingTimeBackground.tiff in Resources */,866 A569C9880CCAA5110046F90E /* HUDSliderKnob.tif in Resources */,867
