Changeset 541
- Timestamp:
- 06/15/09 06:16:28 (16 years ago)
- Location:
- trunk/Cocoa/Pester/Source
- Files:
-
- 2 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m
r537 r541 9 9 #import "NJRQTMediaPopUpButton.h" 10 10 #import "NJRSoundManager.h" 11 #import " NSMovie-NJRExtensions.h"11 #import "QTMovie-NJRExtensions.h" 12 12 #import "NSMenuItem-NJRExtensions.h" 13 14 #import <QTKit/QTKit.h>15 13 16 14 #include <limits.h> … … 372 370 } 373 371 } else { 374 NSMovie *movie = [[NSMovie alloc] initWithURL: [NSURL fileURLWithPath: [selectedAlias fullPath]] byReference: YES]; 375 movieCanRepeat = ![movie isStatic]; 376 if (movieHasAudio = [movie hasAudio]) { 377 [preview setMovie: doPreview ? [QTMovie movieWithURL: [NSURL fileURLWithPath: [selectedAlias fullPath]] error: NULL] : nil]; // XXX handle errors; fix 372 NSError *error; 373 QTMovie *movie = [[QTMovie alloc] initWithFile: [selectedAlias fullPath] error: &error]; 374 movieCanRepeat = ![movie NJR_isStatic]; 375 if (movieHasAudio = [movie NJR_hasAudio]) { 376 [preview setMovie: doPreview ? movie : nil]; 378 377 } else { 379 378 [self _resetPreview]; 380 379 doPreview = NO; 381 380 if (movie == nil) { 382 NSBeginAlertSheet(@"Format not recognized", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"The item you selected isn't a sound or movie recognized by QuickTime. Please select a different item.", "Message displayed in alert sheet when media document is not recognized by QuickTime"));381 NSBeginAlertSheet(@"Format not recognized", nil, nil, nil, [self window], nil, nil, nil, nil, [NSString stringWithFormat: NSLocalizedString(@"The item you selected isn't an image, sound or movie recognized by QuickTime. (%@)\n\nPlease select a different item.", "Message displayed in alert sheet when media document is not recognized by QuickTime"), [error localizedDescription]]); 383 382 [self _invalidateSelection]; 384 383 return NO; 385 384 } 386 if (![movie hasAudio] && ![moviehasVideo]) {387 NSBeginAlertSheet(@"No video or audio", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"'%@' contains neither audio nor video content playable by QuickTime. 385 if (![movie NJR_hasAudio] && ![movie NJR_hasVideo]) { 386 NSBeginAlertSheet(@"No video or audio", nil, nil, nil, [self window], nil, nil, nil, nil, NSLocalizedString(@"'%@' contains neither audio nor video content playable by QuickTime.\n\nPlease select a different item.", "Message displayed in alert sheet when media document is readable, but has neither audio nor video tracks"), [[NSFileManager defaultManager] displayNameAtPath: [selectedAlias fullPath]]); 388 387 [self _invalidateSelection]; 389 388 [movie release]; -
trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj
r532 r541 59 59 E1B11F4D0CF5F30F004975AA /* NSCharacterSet-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F5B79865038865B30136A8DD /* NSCharacterSet-NJRExtensions.m */; }; 60 60 E1B11F4E0CF5F30F004975AA /* NSDictionary-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F5EE8DB9038A76AC0134BEAC /* NSDictionary-NJRExtensions.m */; }; 61 E1B11F500CF5F30F004975AA /* NSMovie-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */; };61 E1B11F500CF5F30F004975AA /* QTMovie-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */; }; 62 62 E1B11F510CF5F30F004975AA /* NSString-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E1F0B14F03ADBE3800AEFBE0 /* NSString-NJRExtensions.m */; }; 63 63 E1B11F520CF5F30F004975AA /* NSTableView-NJRExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = E162698303B6189000000028 /* NSTableView-NJRExtensions.m */; }; … … 309 309 F59E4BE7036B2E5E016B311C /* PSScriptAlert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PSScriptAlert.h; sourceTree = "<group>"; }; 310 310 F59E4BEA036B33EC016B311C /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; }; 311 F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = "NSMovie-NJRExtensions.m"; sourceTree = "<group>"; };312 F59E4C0E036B43D2016B311C /* NSMovie-NJRExtensions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "NSMovie-NJRExtensions.h"; sourceTree = "<group>"; };311 F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = "QTMovie-NJRExtensions.m"; sourceTree = "<group>"; }; 312 F59E4C0E036B43D2016B311C /* QTMovie-NJRExtensions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = "QTMovie-NJRExtensions.h"; sourceTree = "<group>"; }; 313 313 F59F6CB40354E7DA01AEEDB1 /* PSAlarm.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PSAlarm.h; sourceTree = "<group>"; }; 314 314 F59F6CB50354E7DA01AEEDB1 /* PSAlarm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSAlarm.m; sourceTree = "<group>"; }; … … 491 491 E1B1219C0CF63858004975AA /* NSImage-NJRExtensions.m */, 492 492 E1B1219D0CF63858004975AA /* NSImage-NJRExtensions.h */, 493 F59E4C0E036B43D2016B311C /* NSMovie-NJRExtensions.h */,494 F59E4C0D036B43D2016B311C /* NSMovie-NJRExtensions.m */,493 F59E4C0E036B43D2016B311C /* QTMovie-NJRExtensions.h */, 494 F59E4C0D036B43D2016B311C /* QTMovie-NJRExtensions.m */, 495 495 E1F0B14E03ADBE3800AEFBE0 /* NSString-NJRExtensions.h */, 496 496 E1F0B14F03ADBE3800AEFBE0 /* NSString-NJRExtensions.m */, … … 869 869 E1B11F4D0CF5F30F004975AA /* NSCharacterSet-NJRExtensions.m in Sources */, 870 870 E1B11F4E0CF5F30F004975AA /* NSDictionary-NJRExtensions.m in Sources */, 871 E1B11F500CF5F30F004975AA /* NSMovie-NJRExtensions.m in Sources */,871 E1B11F500CF5F30F004975AA /* QTMovie-NJRExtensions.m in Sources */, 872 872 E1B11F510CF5F30F004975AA /* NSString-NJRExtensions.m in Sources */, 873 873 E1B11F520CF5F30F004975AA /* NSTableView-NJRExtensions.m in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.