- Timestamp:
- 06/15/09 23:02:41 (15 years ago)
- Location:
- trunk/Cocoa/Pester/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSMediaAlert.h
r133 r544 9 9 #import "PSAlert.h" 10 10 11 extern const float PSMediaAlertNoVolume; 11 12 12 13 @interface PSMediaAlert : PSAlert { -
trunk/Cocoa/Pester/Source/PSMediaAlert.m
r543 r544 15 15 static NSString * const PLAlertOutputVolume = @"volume"; // NSNumber 16 16 17 staticconst float PSMediaAlertNoVolume = 0;17 const float PSMediaAlertNoVolume = 0; 18 18 19 19 @implementation PSMediaAlert -
trunk/Cocoa/Pester/Source/PSMovieAlert.h
r543 r544 8 8 9 9 #import <AppKit/AppKit.h> 10 #import <QTKit/QTKit.h>11 10 #import "PSMediaAlert.h" 12 11 13 12 @class BDAlias; 13 @class QTMovie; 14 14 15 15 @interface PSMovieAlert : PSMediaAlert { 16 16 BDAlias *alias; 17 QTMovie *movie;18 17 BOOL hasAudio; 19 18 BOOL hasVideo; -
trunk/Cocoa/Pester/Source/PSMovieAlert.m
r543 r544 7 7 // 8 8 9 #import <QTKit/QTKit.h> 9 10 #import <QuickTime/Movies.h> 10 11 #import "PSMovieAlert.h" … … 35 36 alias = [anAlias retain]; 36 37 repetitions = numReps; 37 // 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). 38 movie = [[QTMovie alloc] initWithFile: path error: NULL]; 38 QTMovie *movie = [[QTMovie alloc] initWithFile: path error: NULL]; 39 39 if (movie == nil) { 40 40 [self release]; … … 48 48 } 49 49 } 50 [movie release]; 50 51 } 51 52 … … 65 66 - (QTMovie *)movie; 66 67 { 67 return movie; 68 NSString *path = [alias fullPath]; 69 if (path == nil) 70 return nil; 71 72 return [[[QTMovie alloc] initWithFile: path error: NULL] autorelease]; 68 73 } 69 74 … … 81 86 { 82 87 [alias release]; 83 [movie release]; 88 89 NSLog(@"PSMovieAlert dealloc: %@", self); 84 90 [super dealloc]; 85 91 } … … 87 93 - (NSString *)description; 88 94 { 89 return [NSString stringWithFormat: @"PSMovieAlert (%@%@): %@, repeats %hu times%@", hasAudio ? @"A" : @"", hasVideo ? @"V" : @"", [alias fullPath], repetitions, hasAudio && outputVolume != kNoVolume ? [NSString stringWithFormat: @" at %.0f%% volume", outputVolume * 100] : @""];95 return [NSString stringWithFormat: @"PSMovieAlert (%@%@): %@, repeats %hu times%@", hasAudio ? @"A" : @"", hasVideo ? @"V" : @"", [alias fullPath], repetitions, hasAudio && outputVolume != PSMediaAlertNoVolume ? [NSString stringWithFormat: @" at %.0f%% volume", outputVolume * 100] : @""]; 90 96 } 91 97 … … 97 103 - (NSAttributedString *)actionDescription; 98 104 { 99 BOOL isStatic = [ movieNJR_isStatic];105 BOOL isStatic = [[self movie] NJR_isStatic]; 100 106 NSMutableAttributedString *string = [[(isStatic ? @"Show " : @"Play ") small] mutableCopy]; 101 107 NSString *kindString = nil, *name = [alias displayNameWithKindString: &kindString];
Note:
See TracChangeset
for help on using the changeset viewer.