Index: /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/classes.nib
===================================================================
--- /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/classes.nib	(revision 542)
+++ /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/classes.nib	(revision 543)
@@ -1,15 +1,51 @@
-{
-    IBClasses = (
-        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
-        {CLASS = NJRCenteringMovieView; LANGUAGE = ObjC; SUPERCLASS = NSMovieView; }, 
-        {
-            ACTIONS = {close = id; }; 
-            CLASS = PSMovieAlertController; 
-            LANGUAGE = ObjC; 
-            OUTLETS = {movieView = NSMovieView; }; 
-            SUPERCLASS = NSWindowController; 
-        }, 
-        {CLASS = "java.lang.Object"; LANGUAGE = Java; }
-    ); 
-    IBVersion = 1; 
-}
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IBClasses</key>
+	<array>
+		<dict>
+			<key>CLASS</key>
+			<string>NSObject</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>FirstResponder</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSObject</string>
+		</dict>
+		<dict>
+			<key>ACTIONS</key>
+			<dict>
+				<key>close</key>
+				<string>id</string>
+			</dict>
+			<key>CLASS</key>
+			<string>PSMovieAlertController</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>OUTLETS</key>
+			<dict>
+				<key>movieView</key>
+				<string>QTMovieView</string>
+			</dict>
+			<key>SUPERCLASS</key>
+			<string>NSWindowController</string>
+		</dict>
+		<dict>
+			<key>CLASS</key>
+			<string>NSWindow</string>
+			<key>LANGUAGE</key>
+			<string>ObjC</string>
+			<key>SUPERCLASS</key>
+			<string>NSResponder</string>
+		</dict>
+	</array>
+	<key>IBVersion</key>
+	<string>1</string>
+</dict>
+</plist>
Index: /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/info.nib
===================================================================
--- /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/info.nib	(revision 542)
+++ /trunk/Cocoa/Pester/Source/English.lproj/Movie alert.nib/info.nib	(revision 543)
@@ -1,16 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>IBDocumentLocation</key>
-	<string>36 16 356 240 0 0 1280 832 </string>
 	<key>IBFramework Version</key>
-	<string>291.0</string>
+	<string>677</string>
+	<key>IBLastKnownRelativeProjectPath</key>
+	<string>../Pester.xcodeproj</string>
+	<key>IBOldestOS</key>
+	<integer>4</integer>
 	<key>IBOpenObjects</key>
 	<array>
-		<integer>10</integer>
+		<integer>51</integer>
 	</array>
 	<key>IBSystem Version</key>
-	<string>6G30</string>
+	<string>9J61</string>
+	<key>targetFramework</key>
+	<string>IBCocoaFramework</string>
 </dict>
 </plist>
Index: unk/Cocoa/Pester/Source/NJRCenteringMovieView.h
===================================================================
--- /trunk/Cocoa/Pester/Source/NJRCenteringMovieView.h	(revision 542)
+++ 	(revision )
@@ -1,16 +1,0 @@
-//
-//  NJRCenteringMovieView.h
-//  Pester
-//
-//  Created by Nicholas Riley on Fri Jan 03 2003.
-//  Copyright (c) 2003 Nicholas Riley. All rights reserved.
-//
-
-#import <AppKit/AppKit.h>
-
-
-@interface NJRCenteringMovieView : NSMovieView {
-
-}
-
-@end
Index: unk/Cocoa/Pester/Source/NJRCenteringMovieView.m
===================================================================
--- /trunk/Cocoa/Pester/Source/NJRCenteringMovieView.m	(revision 542)
+++ 	(revision )
@@ -1,57 +1,0 @@
-//
-//  NJRCenteringMovieView.m
-//  Pester
-//
-//  Created by Nicholas Riley on Fri Jan 03 2003.
-//  Copyright (c) 2003 Nicholas Riley. All rights reserved.
-//
-
-#import "NJRCenteringMovieView.h"
-#import <QuickTime/Movies.h>
-
-@implementation NJRCenteringMovieView
-
-// from _MacTech_ December 2002, p. 76
-
-- (NSRect)movieRect;
-{
-    NSRect viewRect = [super movieRect];
-    Movie qtMovie = [[self movie] QTMovie];
-    Rect movieRect = {0, 0, 0, 0};
-
-    GetMovieNaturalBoundsRect(qtMovie, &movieRect);
-
-    float movieWidth = movieRect.right - movieRect.left;
-    float movieHeight = movieRect.bottom - movieRect.top;
-
-    if ( (movieWidth <= viewRect.size.width) &&
-         (movieHeight <= viewRect.size.height) ) {
-        // Movie is smaller than or equal to the view size; just center the movie
-        viewRect.origin.y += (int)((viewRect.size.height - movieHeight) / 2.);
-        viewRect.size.height = movieHeight;
-
-        viewRect.origin.x += (int)((viewRect.size.width - movieWidth) / 2.);
-        viewRect.size.width = movieWidth;
-    } else {
-        // We need to scale down movie, centering horizontally and vertically
-        float movieRatio = movieWidth / (float)movieHeight;
-        float viewRatio = viewRect.size.width / viewRect.size.height;
-
-        if (movieRatio > viewRatio) {
-            // Movie is wider than will fit; rescale.
-            float newHeight = viewRect.size.width / movieRatio;
-
-            viewRect.origin.y += (int)((viewRect.size.height - newHeight) / 2.);
-            viewRect.size.height = newHeight;
-        } else {
-            // Movie is taller than will fit (or has the ideal aspect ratio); rescale.
-            float newWidth = viewRect.size.height * movieRatio;
-
-            viewRect.origin.x += (int) ((viewRect.size.width - newWidth) / 2.);
-            viewRect.size.width = newWidth;
-        }
-    }
-    return viewRect;
-}
-
-@end
Index: /trunk/Cocoa/Pester/Source/PSMediaAlert.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSMediaAlert.m	(revision 542)
+++ /trunk/Cocoa/Pester/Source/PSMediaAlert.m	(revision 543)
@@ -10,9 +10,10 @@
 #import "NSDictionary-NJRExtensions.h"
 #import "NJRSoundManager.h"
-#import <QuickTime/Movies.h>
 
 // property list keys
 static NSString * const PLAlertRepetitions = @"times"; // NSString
 static NSString * const PLAlertOutputVolume = @"volume"; // NSNumber
+
+static const float PSMediaAlertNoVolume = 0;
 
 @implementation PSMediaAlert
@@ -50,5 +51,5 @@
         outputVolume = volume;
     else
-        outputVolume = kNoVolume;
+        outputVolume = PSMediaAlertNoVolume;
 }
 
@@ -59,5 +60,5 @@
     NSMutableDictionary *plAlert = [[super propertyListRepresentation] mutableCopy];
     [plAlert setObject: [NSNumber numberWithUnsignedShort: repetitions] forKey: PLAlertRepetitions];
-    if (outputVolume != kNoVolume) {
+    if (outputVolume != PSMediaAlertNoVolume) {
         [plAlert setObject: [NSNumber numberWithFloat: outputVolume] forKey: PLAlertOutputVolume];
     }
Index: /trunk/Cocoa/Pester/Source/PSMovieAlert.h
===================================================================
--- /trunk/Cocoa/Pester/Source/PSMovieAlert.h	(revision 542)
+++ /trunk/Cocoa/Pester/Source/PSMovieAlert.h	(revision 543)
@@ -8,4 +8,5 @@
 
 #import <AppKit/AppKit.h>
+#import <QTKit/QTKit.h>
 #import "PSMediaAlert.h"
 
@@ -14,5 +15,5 @@
 @interface PSMovieAlert : PSMediaAlert {
     BDAlias *alias;
-    NSMovie *movie;
+    QTMovie *movie;
     BOOL hasAudio;
     BOOL hasVideo;
@@ -24,5 +25,5 @@
 
 - (BOOL)hasVideo;
-- (NSMovie *)movie;
+- (QTMovie *)movie;
 - (BDAlias *)movieFileAlias;
 
Index: /trunk/Cocoa/Pester/Source/PSMovieAlert.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSMovieAlert.m	(revision 542)
+++ /trunk/Cocoa/Pester/Source/PSMovieAlert.m	(revision 543)
@@ -11,5 +11,5 @@
 #import "PSMovieAlertController.h"
 #import "NSDictionary-NJRExtensions.h"
-#import "NSMovie-NJRExtensions.h"
+#import "QTMovie-NJRExtensions.h"
 #import "BDAlias.h"
 
@@ -36,11 +36,11 @@
         repetitions = numReps;
         // XXX if we support remote movie URLs, need to call EnterMovies() ourselves at least in Jaguar (_MacTech_ December 2002, p. 64); also should do async movie loading (p. 73Ð74).
-        movie = [[NSMovie alloc] initWithURL: [NSURL fileURLWithPath: path] byReference: YES];
+	movie = [[QTMovie alloc] initWithFile: path error: NULL];
         if (movie == nil) {
             [self release];
             self = nil;
         } else {
-            hasAudio = [movie hasAudio];
-            hasVideo = [movie hasVideo];
+            hasAudio = [movie NJR_hasAudio];
+            hasVideo = [movie NJR_hasVideo];
             
             if (!hasAudio && !hasVideo) {
@@ -63,5 +63,5 @@
 }
 
-- (NSMovie *)movie;
+- (QTMovie *)movie;
 {
     return movie;
@@ -97,5 +97,5 @@
 - (NSAttributedString *)actionDescription;
 {
-    BOOL isStatic = [movie isStatic];
+    BOOL isStatic = [movie NJR_isStatic];
     NSMutableAttributedString *string = [[(isStatic ? @"Show " : @"Play ") small] mutableCopy];
     NSString *kindString = nil, *name = [alias displayNameWithKindString: &kindString];
Index: /trunk/Cocoa/Pester/Source/PSMovieAlertController.h
===================================================================
--- /trunk/Cocoa/Pester/Source/PSMovieAlertController.h	(revision 542)
+++ /trunk/Cocoa/Pester/Source/PSMovieAlertController.h	(revision 543)
@@ -11,9 +11,10 @@
 @class PSAlarm;
 @class PSMovieAlert;
+@class QTMovieView;
 
 @interface PSMovieAlertController : NSWindowController {
     PSAlarm *alarm;
     PSMovieAlert *alert;
-    IBOutlet NSMovieView *movieView;
+    IBOutlet QTMovieView *movieView;
     void *theMovie; /* Movie */
     unsigned short repetitions;
Index: /trunk/Cocoa/Pester/Source/PSMovieAlertController.m
===================================================================
--- /trunk/Cocoa/Pester/Source/PSMovieAlertController.m	(revision 542)
+++ /trunk/Cocoa/Pester/Source/PSMovieAlertController.m	(revision 543)
@@ -10,5 +10,5 @@
 #import "PSMovieAlertController.h"
 #import "PSMovieAlert.h"
-#import "NSMovie-NJRExtensions.h"
+#import "QTMovie-NJRExtensions.h"
 #import "NJRSoundManager.h"
 #import <QuickTime/Movies.h>
@@ -38,5 +38,5 @@
         repetitionsRemaining--;
         [movieView gotoBeginning: self];
-        [movieView start: self];
+        [movieView play: self];
     }
     delay = (GetMovieDuration((Movie)theMovie) - GetMovieTime((Movie)theMovie, NULL)) / (double)GetMovieTimeScale((Movie)theMovie);
@@ -48,14 +48,13 @@
 {
     if ([self initWithWindowNibName: @"Movie alert"]) {
-        NSMovie *movie = [anAlert movie];
+        QTMovie *movie = [anAlert movie];
         NSWindow *window = [self window]; // connect outlets
         alarm = anAlarm;
         alert = anAlert;
+        theMovie = [movie quickTimeMovie];
         [movieView setMovie: movie];
-        theMovie = [movie QTMovie];
         if ([alert hasVideo]) {
             NSRect screenRect = [[window screen] visibleFrame];
-            float magnification = 1.0;
-            NSSize movieSize;
+            NSSize movieSize = [[movie attributeForKey: QTMovieNaturalSizeAttribute] sizeValue];
             NSSize minSize = [window minSize];
             float windowFrameHeight = [window frame].size.height - [[window contentView] frame].size.height;
@@ -63,11 +62,7 @@
             screenRect.size.height -= windowFrameHeight;
             minSize.height -= windowFrameHeight;
-            while (1) {
-                movieSize = [movieView sizeForMagnification: magnification];
-                movieSize.height -= 16; // controller is hidden, but its size is included (documented, ergh)
-                if (movieSize.width > screenRect.size.width || movieSize.height > screenRect.size.height)
-                    magnification /= 2;
-                else
-                    break;
+            while (movieSize.width > screenRect.size.width || movieSize.height > screenRect.size.height) {
+                movieSize.width /= 2;
+		movieSize.height /= 2;
             }
             if (movieSize.width < minSize.width) movieSize.width = minSize.width;
@@ -94,8 +89,8 @@
         repetitions = [alert repetitions];
         repetitionsRemaining = repetitions;
-        if ([movie hasAudio] && [NJRSoundManager volumeIsNotMutedOrInvalid: [alert outputVolume]] && [NJRSoundManager saveDefaultOutputVolume]) {
+        if ([movie NJR_hasAudio] && [NJRSoundManager volumeIsNotMutedOrInvalid: [alert outputVolume]] && [NJRSoundManager saveDefaultOutputVolume]) {
             [NJRSoundManager setDefaultOutputVolume: [alert outputVolume]];
         }
-        if (![movie isStatic]) [self play]; // if it's an image, don't close the window automatically
+        if (![movie NJR_isStatic]) [self play]; // if it's an image, don't close the window automatically
     }
     return self;
@@ -115,5 +110,5 @@
 {
     repetitions = 0;
-    [movieView stop: self];
+    [movieView pause: self];
     [alert completedForAlarm: alarm];
     [self autorelease];
Index: /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj
===================================================================
--- /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj	(revision 542)
+++ /trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj	(revision 543)
@@ -82,5 +82,4 @@
 		E1B11F650CF5F30F004975AA /* NJRIntervalField.m in Sources */ = {isa = PBXBuildFile; fileRef = E13919E303B9E4E100000028 /* NJRIntervalField.m */; };
 		E1B11F660CF5F30F004975AA /* PSError.m in Sources */ = {isa = PBXBuildFile; fileRef = E1ECA00703C002B300F54C66 /* PSError.m */; };
-		E1B11F670CF5F30F004975AA /* NJRCenteringMovieView.m in Sources */ = {isa = PBXBuildFile; fileRef = E1D358BA03C60CE900C8A18E /* NJRCenteringMovieView.m */; };
 		E1B11F690CF5F30F004975AA /* PSTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = E1BF6E9103C928D200050002 /* PSTimer.m */; };
 		E1B11F6A0CF5F30F004975AA /* PSWakeAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = E19FD39F03C98645001509F3 /* PSWakeAlert.m */; };
@@ -242,6 +241,4 @@
 		E1CDEC3D0444053F00AEEDB1 /* NJRNonCenteringWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NJRNonCenteringWindow.h; sourceTree = "<group>"; };
 		E1CDEC3E0444053F00AEEDB1 /* NJRNonCenteringWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NJRNonCenteringWindow.m; sourceTree = "<group>"; };
-		E1D358B903C60CE900C8A18E /* NJRCenteringMovieView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NJRCenteringMovieView.h; sourceTree = "<group>"; };
-		E1D358BA03C60CE900C8A18E /* NJRCenteringMovieView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NJRCenteringMovieView.m; sourceTree = "<group>"; };
 		E1DEF0EA03FE1BF100050002 /* OARightArrowPressed.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OARightArrowPressed.tiff; sourceTree = "<group>"; };
 		E1DEF0EB03FE1BF100050002 /* OALeftArrow.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = OALeftArrow.tiff; sourceTree = "<group>"; };
@@ -655,6 +652,4 @@
 			children = (
 				E17F2F4C03FDF67D00050002 /* OACalendarView */,
-				E1D358B903C60CE900C8A18E /* NJRCenteringMovieView.h */,
-				E1D358BA03C60CE900C8A18E /* NJRCenteringMovieView.m */,
 				E1F0B14A03AD8CEF00AEFBE0 /* NJRUnfocusableMovieView.h */,
 				E1F0B14B03AD8CEF00AEFBE0 /* NJRUnfocusableMovieView.m */,
@@ -892,5 +887,4 @@
 				E1B11F650CF5F30F004975AA /* NJRIntervalField.m in Sources */,
 				E1B11F660CF5F30F004975AA /* PSError.m in Sources */,
-				E1B11F670CF5F30F004975AA /* NJRCenteringMovieView.m in Sources */,
 				E1B11F690CF5F30F004975AA /* PSTimer.m in Sources */,
 				E1B11F6A0CF5F30F004975AA /* PSWakeAlert.m in Sources */,
