Changeset 136 for trunk/Cocoa/Pester/Source/PSVolumeController.m
- Timestamp:
- 04/09/03 08:46:50 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSVolumeController.m
r133 r136 9 9 #import "PSVolumeController.h" 10 10 #import "NJRSoundManager.h" 11 #import "NJRNonCenteringWindow.h" 11 12 12 13 @implementation PSVolumeController … … 21 22 if ( (self = [self initWithWindowNibName: @"Volume"]) != nil) { 22 23 [self window]; // connect outlets 23 NSWindow *window = [[NSWindow alloc] initWithContentRect: [contentView bounds] styleMask: NSBorderlessWindowMask | NSTexturedBackgroundWindowMask backing: NSBackingStoreBuffered defer: NO]; 24 25 NSModalSession session = [NSApp beginModalSessionForWindow: window]; 26 [window orderOut: self]; 24 NSWindow *window = [[NJRNonCenteringWindow alloc] initWithContentRect: [contentView bounds] styleMask: NSBorderlessWindowMask | NSTexturedBackgroundWindowMask backing: NSBackingStoreBuffered defer: NO]; 27 25 28 26 if ([NJRSoundManager volumeIsNotMutedOrInvalid: volume]) … … 50 48 } 51 49 } 52 [window makeKeyAndOrderFront: self];53 50 51 // -[NSApplication beginModalSessionForWindow:] shows and centers the window; we use NJRNonCenteringWindow to prevent the repositioning from succeeding 52 NSModalSession session = [NSApp beginModalSessionForWindow: window]; 54 53 [volumeSlider mouseDown: [NSApp currentEvent]]; 55 54 [NSApp runModalSession: session];
Note:
See TracChangeset
for help on using the changeset viewer.