Changeset 53 for trunk/Cocoa/Pester/Source/PSMovieAlertController.m
- Timestamp:
- 01/02/03 05:30:03 (21 years ago)
- Location:
- trunk/Cocoa/Pester/Source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source
- Property svn:ignore
-
old new 1 1 build 2 .gdb_history
-
- Property svn:ignore
-
trunk/Cocoa/Pester/Source/PSMovieAlertController.m
r45 r53 17 17 @implementation PSMovieAlertController 18 18 19 + (PSMovieAlertController *)controllerWithAlarm:(PSAlarm *)a larm movieAlert:(PSMovieAlert *)alert;19 + (PSMovieAlertController *)controllerWithAlarm:(PSAlarm *)anAlarm movieAlert:(PSMovieAlert *)anAlert; 20 20 { 21 return [[self alloc] initWithAlarm: a larm movieAlert: alert];21 return [[self alloc] initWithAlarm: anAlarm movieAlert: anAlert]; 22 22 } 23 23 … … 39 39 } 40 40 41 - (id)initWithAlarm:(PSAlarm *)a larm movieAlert:(PSMovieAlert *)alert;41 - (id)initWithAlarm:(PSAlarm *)anAlarm movieAlert:(PSMovieAlert *)anAlert; 42 42 { 43 43 if ([self initWithWindowNibName: @"Movie alert"]) { 44 NSMovie *movie = [a lert movie];44 NSMovie *movie = [anAlert movie]; 45 45 NSWindow *window = [self window]; // connect outlets 46 alarm = anAlarm; 47 alert = anAlert; 46 48 [movieView setMovie: movie]; 47 49 theMovie = [movie QTMovie]; … … 67 69 [window setFrame: frame display: NO]; 68 70 [window setTitle: [alarm message]]; 71 { // XXX workaround for (IMO) ugly appearance of Cocoa utility windows 72 NSView *miniButton = [window standardWindowButton: NSWindowMiniaturizeButton], 73 *zoomButton = [window standardWindowButton: NSWindowZoomButton]; 74 // NOTE: this will not work if the window is resizable: when the frame is reset, the standard buttons reappear 75 [miniButton setFrameOrigin: NSMakePoint(-100, -100)]; 76 [zoomButton setFrameOrigin: NSMakePoint(-100, -100)]; 77 [[miniButton superview] setNeedsDisplay: YES]; 78 [[zoomButton superview] setNeedsDisplay: YES]; 79 } 69 80 [[self window] orderFrontRegardless]; 70 81 } … … 91 102 repetitions = 0; 92 103 [movieView stop: self]; 93 [self release]; 104 [alert completedForAlarm: alarm]; 105 [self autorelease]; 94 106 // note: there may still be a retained copy of this object until the runloop timer has let go of us at the end of the current movie playback cycle; donÕt worry about it. 95 107 }
Note:
See TracChangeset
for help on using the changeset viewer.