Changeset 544 for trunk/Cocoa/Pester/Source/PSMovieAlert.m
- Timestamp:
- 06/15/09 23:02:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.