Changeset 5519

Show
Ignore:
Timestamp:
05/11/08 17:18:10 (5 days ago)
Author:
morris
Message:

Refactor overlay stuff, add overlay icons

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Spiral/trunk/English.lproj/Credits.rtf

    r5099 r5519  
    1 {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf42
    2 {\fonttbl\f0\fnil\fcharset77 LucidaGrande-Bold;\f1\fnil\fcharset77 LucidaGrande;} 
     1{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf27
     2{\fonttbl\f0\fnil\fcharset0 LucidaGrande;} 
    33{\colortbl;\red255\green255\blue255;} 
    44\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc 
    55 
    66\f0\b\fs22 \cf0 Created By 
    7 \f1\b0 \ 
     7\b0 \ 
    88Axel Andersson\ 
    99\ 
    1010 
    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 \ 
    1320\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 
    1421\cf0 Martin Kahr\ 
  • Spiral/trunk/English.lproj/Overlay.nib/classes.nib

    r5121 r5519  
    129129                                <key>_nextButton</key> 
    130130                                <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> 
    131137                                <key>_overlayTextField</key> 
     138                                <string>NSTextField</string> 
     139                                <key>_overlayTimeTextField</key> 
     140                                <string>NSTextField</string> 
     141                                <key>_overlayTopTextField</key> 
    132142                                <string>NSTextField</string> 
    133143                                <key>_overlayView</key> 
  • Spiral/trunk/English.lproj/Overlay.nib/info.nib

    r5475 r5519  
    55        <key>IBFramework Version</key> 
    66        <string>629</string> 
     7        <key>IBLastKnownRelativeProjectPath</key> 
     8        <string>../../Spiral.xcodeproj</string> 
    79        <key>IBOldestOS</key> 
    810        <integer>5</integer> 
  • Spiral/trunk/SPDrillController.m

    r5481 r5519  
    7070        [_movieView setFrame:frame]; 
    7171        [_overlayWindow setFrame:frame display:YES]; 
     72        [_movieController adjustOverlayWindow]; 
    7273        [[_movieView window] display]; 
    7374} 
  • Spiral/trunk/SPMovieController.h

    r5493 r5519  
    7070         
    7171        IBOutlet NSView                                 *_overlayView; 
    72         IBOutlet NSTextField                    *_overlayTextField; 
     72        IBOutlet NSImageView                    *_overlayImageView; 
     73        IBOutlet NSTextField                    *_overlayLoadingStatusTextField; 
     74        IBOutlet NSTextField                    *_overlayStatusTextField; 
     75        IBOutlet NSTextField                    *_overlayTimeTextField; 
    7376         
    7477        IBOutlet NSView                                 *_hudView; 
     
    160163- (BOOL)isInFullscreen; 
    161164- (void)orderFrontFullscreenHUDWindow; 
     165- (void)adjustOverlayWindow; 
    162166- (void)resumePlaying; 
    163167- (float)rate; 
     
    165169- (void)cycleSubtitleTracksForwards:(BOOL)forwards; 
    166170- (void)cycleAspectRatiosForwards:(BOOL)forwards; 
    167 - (void)flashCurrentTime
     171- (void)showStatusOverlay
    168172- (BOOL)openNext; 
    169173- (BOOL)openNextAndStartPlaying:(BOOL)startPlaying; 
  • Spiral/trunk/SPMovieController.m

    r5493 r5519  
    3737@interface SPMovieController(Private) 
    3838 
    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; 
    4256 
    4357- (void)_loadAttributes; 
     
    5266- (void)_updateTimeTextFieldsForInterval:(NSTimeInterval)interval; 
    5367 
     68- (NSString *)_currentTimeString; 
     69 
    5470@end 
    5571 
     
    5773@implementation SPMovieController(Private) 
    5874 
    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:@""]; 
    102263} 
    103264 
     
    106267- (void)_hideOverlayWindow { 
    107268        [_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]]; 
    114287} 
    115288 
     
    240413        } 
    241414         
    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        } 
    244419         
    245420        [_trackingSlider setProgressDoubleValue:_trackLoadingProgress]; 
     
    319494        [_hudElapsedTimeTextField setStringValue:elapsed]; 
    320495        [_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         
    323511@end 
    324512 
     
    541729 
    542730- (void)windowWillClose:(NSNotification *)notification { 
     731        [NSObject cancelPreviousPerformRequestsWithTarget:self]; 
     732 
    543733        [self stop]; 
    544734        [self setMovie:NULL]; 
     
    548738 
    549739- (void)windowDidResize:(NSNotification *)notification { 
    550         NSWindow        *window; 
    551         NSSize          size; 
     740        NSWindow               *window; 
     741        NSSize                 size; 
    552742         
    553743        window = [notification object]; 
     
    555745        if(window == [_movieView window]) { 
    556746                size = [window frame].size; 
     747 
    557748                _currentMovieSize.width = size.width; 
    558749                _currentMovieSize.height = size.height - (size.height - [_movieView frame].size.height); 
    559750 
    560751                [[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        } 
    565765} 
    566766 
     
    608808- (void)movieView:(SPQTMovieView *)movieView didReceiveEvent:(NSEvent *)event { 
    609809        NSEventType             type; 
     810        NSTimeInterval  timeInterval; 
    610811        unichar                 key; 
    611812         
     
    635836                        case NSPageDownFunctionKey: 
    636837                        case NSPageUpFunctionKey: 
    637                                 [self setCurrentTime:[self currentTime] + [[self class] skipTimeIntervalForKey:key]]; 
     838                                timeInterval = [[self class] skipTimeIntervalForKey:key]; 
    638839                                 
    639                                 [self flashCurrentTime]; 
     840                                [self setCurrentTime:[self currentTime] + timeInterval]; 
     841                                 
     842                                [self _showStatusOverlayForSkipTimeInterval:timeInterval]; 
    640843                                break; 
    641844                                 
     
    643846                                [self setCurrentTime:0.0]; 
    644847                                 
    645                                 [self flashCurrentTime]; 
     848                                [self showStatusOverlay]; 
    646849                                break; 
    647850                                 
     
    649852                                [self setCurrentTime:[self duration]]; 
    650853                                 
    651                                 [self flashCurrentTime]; 
     854                                [self showStatusOverlay]; 
    652855                                break; 
    653856                                 
     
    677880                                 
    678881                        case 't': 
    679                                 [self flashCurrentTime]; 
     882                                [self showStatusOverlay]; 
    680883                                break; 
    681884                } 
     
    8471050                [_movieView setMovie:_movie]; 
    8481051                 
    849                 [_overlayTextField setStringValue:@""]; 
     1052                [self _clearOverlay]; 
     1053 
    8501054                [_hudNameTextField setStringValue:[[[_movie attributeForKey:QTMovieURLAttribute] path] lastPathComponent]]; 
    8511055                 
     
    11191323                        [_movie stop]; 
    11201324        } 
     1325         
     1326        [self showStatusOverlay]; 
    11211327} 
    11221328 
     
    11291335        [_movie setRate:rate]; 
    11301336         
    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]; 
    11371338} 
    11381339 
     
    11931394        _fullscreenDelegate = NULL; 
    11941395        _fullscreenSelector = NULL; 
    1195          
    1196         [self _hideOverlayWindow]; 
    11971396} 
    11981397 
     
    12071406- (void)orderFrontFullscreenHUDWindow { 
    12081407        [_fullscreenWindow orderFrontHUDWindow]; 
     1408} 
     1409 
     1410 
     1411 
     1412- (void)adjustOverlayWindow { 
     1413        [self _adjustOverlayTextFields]; 
     1414        [self _adjustOverlayImageView]; 
    12091415} 
    12101416 
     
    12981504        } 
    12991505         
    1300         [self _flashOverlayString:[NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"), 
     1506        [self _flashStatusOverlayString:[NSSWF:NSLS(@"Audio Track: %@", @"Audio track overlay"), 
    13011507                [[self audioTrackNames] objectAtIndex:[self audioTrack]]]]; 
    13021508} 
     
    13271533        } 
    13281534         
    1329         [self _flashOverlayString:[NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"), 
     1535        [self _flashStatusOverlayString:[NSSWF:NSLS(@"Subtitle Track: %@", @"Subtitle track overlay"), 
    13301536                [[self subtitleTrackNames] objectAtIndex:[self subtitleTrack]]]]; 
    13311537} 
     
    13521558        [self setAspectRatio:aspectRatio];  
    13531559 
    1354         [self _flashOverlayString:[NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"), 
     1560        [self _flashStatusOverlayString:[NSSWF:NSLS(@"Aspect Ratio: %@", @"Aspect ratio overlay"), 
    13551561                [[[self class] aspectRatioNames] objectAtIndex:[self aspectRatio]]]]; 
    13561562} 
     
    13581564 
    13591565 
    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]; 
    13641568} 
    13651569 
     
    14081612                } 
    14091613                 
     1614                [self _flashOverlayImage:[NSImage imageNamed:@"OverlayPrevious"]]; 
     1615 
    14101616                if(_disablePlayingWhenOpened) { 
    14111617                        [self playWhenTracksAreLoaded]; 
     
    14751681                        continue; 
    14761682                } 
     1683 
     1684                [self _flashOverlayImage:[NSImage imageNamed:@"OverlayNext"]]; 
    14771685 
    14781686                if(_disablePlayingWhenOpened) { 
     
    15231731        [data writeToFile:[path stringByExpandingTildeInPath] atomically:YES]; 
    15241732         
    1525         [self _flashOverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay")]; 
     1733        [self _flashStatusOverlayString:NSLS(@"Snapshot Saved To Desktop", @"Snapshot overlay")]; 
    15261734} 
    15271735 
  • Spiral/trunk/SPPlayerController.m

    r5512 r5519  
    158158                [_movieView setFrame:frame]; 
    159159                [_overlayWindow setFrame:frame display:YES]; 
     160                [_movieController adjustOverlayWindow]; 
    160161                [[_movieView window] display]; 
    161162        } 
     
    217218        [_overlayWindow setFrame:frame display:YES]; 
    218219        [[self window] addChildWindow:_overlayWindow ordered:NSWindowAbove]; 
     220        [_movieController adjustOverlayWindow]; 
    219221         
    220222        _hudWindow = [[_movieController HUDWindow] retain]; 
     
    288290                frame.size = [_movieView frame].size; 
    289291                [_overlayWindow setFrame:frame display:YES]; 
     292                [_movieController adjustOverlayWindow]; 
    290293        } 
    291294} 
     
    432435        [_overlayWindow setFrame:frame display:YES]; 
    433436        [[self window] addChildWindow:_overlayWindow ordered:NSWindowAbove]; 
     437        [_movieController adjustOverlayWindow]; 
    434438         
    435439        [_movieView retain]; 
  • Spiral/trunk/SPPreferencesController.m

    r5472 r5519  
    135135                   selector:@selector(bluetoothRemoteDidConnect:) 
    136136                           name:SPBluetoothRemoteDidConnect]; 
     137 
     138        [[NSNotificationCenter defaultCenter] 
     139                addObserver:self 
     140                   selector:@selector(bluetoothRemoteDidDisconnect:) 
     141                           name:SPBluetoothRemoteDidDisconnect]; 
    137142         
    138143        return self; 
     
    182187        remote = [notification object]; 
    183188                 
    184         NSLog(@"willconnect %@", remote); 
    185          
    186189        if(remote == [SPPS3Remote sharedRemote]) 
    187190                [self _updatePS3RemoteStatus]; 
     
    196199         
    197200        remote = [notification object]; 
    198                  
    199         NSLog(@"didconnect %@", remote); 
    200201         
    201202        if(remote == [SPPS3Remote sharedRemote]) 
     
    207208 
    208209 
     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 
    209223#pragma mark - 
    210224 
  • Spiral/trunk/Spiral.xcodeproj/project.pbxproj

    r5481 r5519  
    136136                A59649330CC14F90008728CB /* Next.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A596492F0CC14F8C008728CB /* Next.tiff */; }; 
    137137                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 */; }; 
    138147                A5C7B6190CC7FB4E008FAF45 /* SPAppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = A5C7B6150CC7FB4C008FAF45 /* SPAppleRemote.m */; }; 
    139148                A5C7C3930CC8132F008FAF45 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5C7C3920CC8132F008FAF45 /* IOKit.framework */; }; 
     
    337346                A596492F0CC14F8C008728CB /* Next.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Next.tiff; sourceTree = "<group>"; }; 
    338347                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>"; }; 
    339357                A5C7B6150CC7FB4C008FAF45 /* SPAppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = SPAppleRemote.m; sourceTree = "<group>"; }; 
    340358                A5C7B6160CC7FB4C008FAF45 /* SPAppleRemote.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = SPAppleRemote.h; sourceTree = "<group>"; }; 
     
    379397                                A50932DF083E9530006646D1 /* Cocoa.framework in Frameworks */, 
    380398                                A53901F40596A3E7000FBFD6 /* Carbon.framework in Frameworks */, 
     399                                A5F518810DB669D7001BE2F8 /* IOBluetooth.framework in Frameworks */, 
    381400                                A5C7C3930CC8132F008FAF45 /* IOKit.framework in Frameworks */, 
    382401                                A596317F0CC00949008728CB /* QTKit.framework in Frameworks */, 
    383402                                775903650D103575001CBF86 /* Sparkle.framework in Frameworks */, 
    384403                                A5643D300A26056800ADF4F5 /* WiredAdditions.framework in Frameworks */, 
    385                                 A5F518810DB669D7001BE2F8 /* IOBluetooth.framework in Frameworks */, 
    386404                        ); 
    387405                        runOnlyForDeploymentPostprocessing = 0; 
     
    424442                        isa = PBXGroup; 
    425443                        children = ( 
    426                                 A5F518800DB669D7001BE2F8 /* IOBluetooth.framework */, 
    427444                                A53901F30596A3E7000FBFD6 /* Carbon.framework */, 
    428445                                A50932DE083E9530006646D1 /* Cocoa.framework */, 
    429446                                778F0DE20B64D45500E3CD47 /* CoreFoundation.framework */, 
     447                                A5F518800DB669D7001BE2F8 /* IOBluetooth.framework */, 
    430448                                A5C7C3920CC8132F008FAF45 /* IOKit.framework */, 
    431449                                A596317E0CC00949008728CB /* QTKit.framework */, 
     
    595613                                A569CA600CCAAAD70046F90E /* HUDElapsedTimeBackground.tiff */, 
    596614                                A569C9690CCAA3FE0046F90E /* HUDExit.tiff */, 
     615                                A569C9320CCAA1840046F90E /* HUDNext.tiff */, 
     616                                A569C9310CCAA1840046F90E /* HUDPause.tiff */, 
     617                                A569C9330CCAA1840046F90E /* HUDPlay.tiff */, 
    597618                                A569C9300CCAA1840046F90E /* HUDPrevious.tiff */, 
    598                                 A569C9310CCAA1840046F90E /* HUDPause.tiff */, 
    599                                 A569C9320CCAA1840046F90E /* HUDNext.tiff */, 
    600                                 A569C9330CCAA1840046F90E /* HUDPlay.tiff */, 
    601619                                A569CA620CCAAADD0046F90E /* HUDRemainingTimeBackground.tiff */, 
    602620                                A569C9870CCAA5110046F90E /* HUDSliderKnob.tif */, 
    603                                 A596448F0CC0EC40008728CB /* LCDBackgroundRight.tiff */, 
    604621                                A59644900CC0EC40008728CB /* LCDBackgroundCenter.tiff */, 
    605622                                A59644910CC0EC40008728CB /* LCDBackgroundLeft.tiff */, 
     623                                A596448F0CC0EC40008728CB /* LCDBackgroundRight.tiff */, 
    606624                                A59638640CC0DA14008728CB /* LCDSliderKnob.tiff */, 
    607625                                A55CF34D0CC6AF38006F2DAB /* Minus.tiff */, 
    608626                                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 */, 
    609636                                A596492E0CC14F8C008728CB /* Pause.tiff */, 
    610637                                A596492D0CC14F8C008728CB /* Play.tiff */, 
     
    614641                                A55CF3470CC6AF24006F2DAB /* Plus.tiff */, 
    615642                                A59649300CC14F8C008728CB /* Previous.tiff */, 
     643                                A56D50FC0DB7BD0200F1B2EF /* RemoteConnected.tiff */, 
     644                                A56D50FB0DB7BD0200F1B2EF /* RemoteNoDeviceFound.tiff */, 
    616645                                A56D50FA0DB7BD0200F1B2EF /* RemoteNotConnected.tiff */, 
    617                                 A56D50FB0DB7BD0200F1B2EF /* RemoteNoDeviceFound.tiff */, 
    618                                 A56D50FC0DB7BD0200F1B2EF /* RemoteConnected.tiff */, 
    619646                                A5697FF30CC97A950046F90E /* RepeatAll.tiff */, 
    620647                                A5697FDA0CC978230046F90E /* RepeatOff.tiff */, 
     
    849876                                77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */, 
    850877                                775BF1320CCF730100E93928 /* Drill.nib in Resources */, 
     878                                A5F34DE00DB7FA03004C3DF6 /* DrillItem.nib in Resources */, 
    851879                                775BF86E0CD0C5B800E93928 /* HUD.nib in Resources */, 
    852880                                77A2722F0CC4D03A0040B352 /* Inspector.nib in Resources */, 
     
    856884                                A55CEF6E0CC69A70006F2DAB /* Playlist.nib in Resources */, 
    857885                                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