Ignore:
Timestamp:
01/05/03 23:02:48 (18 years ago)
Author:
Nicholas Riley
Message:

PSScriptAlert.m: Removed reference to NDAppleScriptObject.

PSMovieAlertController.[hm]: Added minimum sizing.

NJRCenteringMovieView.[hm]: Support for centering movie inside its
frame if the frame is too large for the movie; sizes movie
proportionally if necessary (not used in Pester).

NSImage-NJRExtensions.[hm]: Fixed copyright.

Read Me.rtfd: Updated with bug fixes.

PSMovieAlert.m: Note bug in NSMovieView, currently doesn't affect us.

NJRQTMediaPopUpButton.m: Work around background processor use bug when
NSMovieView has movie set but not playing.

NJRVoicePopUpButton.m: Removed obsolete comment.

PSApplication.m: Only show alarm set window on rapp if alerts aren't
expiring.

PSAlarms.[hm]: Added -alarmsExpiring for support of conditional
rapp window open feature in PSApplication.

PSAlarmSetController.m: Stop window update timer and movie playback on
hide, restart timer on activate - fixes background processor usage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSMovieAlertController.m

    r53 r60  
    1212#import "NSMovie-NJRExtensions.h"
    1313#import <QuickTime/Movies.h>
    14 
    15 // XXX if you specify a truly tiny movie, obey the minimum window size to compensate
    1614
    1715@implementation PSMovieAlertController
     
    3634    }
    3735    delay = (GetMovieDuration((Movie)theMovie) - GetMovieTime((Movie)theMovie, NULL)) / (double)GetMovieTimeScale((Movie)theMovie);
     36    // XXX should use a timebase callback for this instead (see NJRQTMediaPopUpButton); also, use QuickTimeÕs built-in loop functionality instead of rolling our own?
    3837    [self performSelector: @selector(play) withObject: nil afterDelay: delay inModes: [NSArray arrayWithObject: NSDefaultRunLoopMode]];
    3938}
     
    5251            float magnification = 1.0;
    5352            NSSize movieSize;
     53            NSSize minSize = [window minSize];
     54            float windowFrameHeight = [window frame].size.height - [[window contentView] frame].size.height;
    5455            NSRect frame;
    55             screenRect.size.height -= [window frame].size.height - [[window contentView] frame].size.height; // account for height of window frame
     56            screenRect.size.height -= windowFrameHeight;
     57            minSize.height -= windowFrameHeight;
    5658            while (1) {
    5759                movieSize = [movieView sizeForMagnification: magnification];
     
    6264                    break;
    6365            }
     66            if (movieSize.width < minSize.width) movieSize.width = minSize.width;
     67            if (movieSize.height < minSize.height) movieSize.width = minSize.height;
    6468            [window setContentSize: movieSize];
    6569            [window center];
Note: See TracChangeset for help on using the changeset viewer.