Changeset 595 for trunk/Cocoa/Pester/Source
- Timestamp:
- 12/21/09 22:11:47 (15 years ago)
- Location:
- trunk/Cocoa/Pester/Source
- Files:
-
- 4 added
- 3 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSVolumeController.m
r584 r595 10 10 #import "NJRSoundManager.h" 11 11 #import "NJRNonCenteringWindow.h" 12 #include <Carbon/Carbon.h> 12 13 13 14 @interface NSMenu (SnowLeopardAdditions) … … 56 57 } 57 58 [menu setAllowsContextMenuPlugIns: NO]; 59 // replace with http://waffle.wootest.net/2007/08/07/popping-up-a-menu-in-cocoa/ 58 60 [menu popUpMenuPositioningItem: nil atLocation: point inView: view]; 59 61 [menu release]; … … 100 102 - (IBAction)volumeSet:(NSSlider *)sender; 101 103 { 104 // XXX don't delay preview for keyboard adjustment 102 105 [delegate volumeController: self didSetVolume: [sender floatValue]]; 103 if (NSEventMaskFromType([[NSApp currentEvent] type]) & (NSLeftMouseUpMask | NSRightMouseUpMask | NSOtherMouseUpMask)) 106 NSLog(@"%@", [NSApp currentEvent]); 107 unsigned eventMask = NSEventMaskFromType([[NSApp currentEvent] type]); 108 // The event may simply be a mouse-up: close the menu. 109 if (eventMask & (NSLeftMouseUpMask | NSRightMouseDownMask | NSOtherMouseDownMask)) 110 [menu cancelTracking]; 111 // On a quick click, the event may be a mouse down but the mouse button is no longer down. 112 if (!(eventMask & (NSLeftMouseDownMask | NSRightMouseDownMask | NSOtherMouseDownMask))) 113 return; 114 // 10.6+: use [NSEvent pressedMouseButtons] instead 115 if (GetCurrentButtonState() == 0) 104 116 [menu cancelTracking]; 105 117 } -
trunk/Cocoa/Pester/Source/Pester.xcodeproj/project.pbxproj
r594 r595 8 8 9 9 /* Begin PBXBuildFile section */ 10 E12CBFD310CC310800159E88 /* NJRMenuSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = E12CBFD210CC310800159E88 /* NJRMenuSlider.m */; }; 10 11 E15044670CFCDC7E00DE47E9 /* NJRValidatingField.m in Sources */ = {isa = PBXBuildFile; fileRef = E15044660CFCDC7E00DE47E9 /* NJRValidatingField.m */; }; 11 12 E17562620CF8C50B00FC5057 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E17562610CF8C50B00FC5057 /* Sparkle.framework */; }; … … 185 186 E127900C0442A92900050002 /* PSVolumeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSVolumeController.h; sourceTree = "<group>"; }; 186 187 E127900D0442A92900050002 /* PSVolumeController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSVolumeController.m; sourceTree = "<group>"; }; 188 E12CBFD110CC310800159E88 /* NJRMenuSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NJRMenuSlider.h; sourceTree = "<group>"; }; 189 E12CBFD210CC310800159E88 /* NJRMenuSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NJRMenuSlider.m; sourceTree = "<group>"; }; 187 190 E130B9AC03B7C59700000028 /* PSPowerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSPowerManager.h; sourceTree = "<group>"; }; 188 191 E130B9AD03B7C59700000028 /* PSPowerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSPowerManager.m; sourceTree = "<group>"; }; … … 671 674 F5F240B6036A862101FE7503 /* NJRFSObjectSelector.h */, 672 675 F5F240B5036A862101FE7503 /* NJRFSObjectSelector.m */, 676 E12CBFD110CC310800159E88 /* NJRMenuSlider.h */, 677 E12CBFD210CC310800159E88 /* NJRMenuSlider.m */, 673 678 F5F240CD036A877301FE7503 /* NJRQTMediaPopUpButton.h */, 674 679 F5F240CC036A877301FE7503 /* NJRQTMediaPopUpButton.m */, … … 938 943 E1B121970CF62FD1004975AA /* NSMenuItem-NJRExtensions.m in Sources */, 939 944 E15044670CFCDC7E00DE47E9 /* NJRValidatingField.m in Sources */, 945 E12CBFD310CC310800159E88 /* NJRMenuSlider.m in Sources */, 940 946 ); 941 947 runOnlyForDeploymentPostprocessing = 0;
Note:
See TracChangeset
for help on using the changeset viewer.