get the action menu to look correct on tiger
This commit is contained in:
parent
2a98bf39d1
commit
a05fe043e5
|
@ -116,6 +116,7 @@
|
|||
A261A8260C6A0D68003BAFDA /* Error.png in Resources */ = {isa = PBXBuildFile; fileRef = A261A8250C6A0D68003BAFDA /* Error.png */; };
|
||||
A261F1DC0A69A1610002815A /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; };
|
||||
A261F1E40A69A1B10002815A /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A261F1DB0A69A1610002815A /* Growl.framework */; };
|
||||
A26397550D0F714300D36DF2 /* ActionPopUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = A26397540D0F714300D36DF2 /* ActionPopUpButton.m */; };
|
||||
A26E75880CB6AA7500226674 /* InfoOptions.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E75870CB6AA7500226674 /* InfoOptions.png */; };
|
||||
A26E75960CB6AB4800226674 /* InfoGeneral.png in Resources */ = {isa = PBXBuildFile; fileRef = A26E75950CB6AB4800226674 /* InfoGeneral.png */; };
|
||||
A2710E770A86796000CE4F7D /* PrefsWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = A2710E750A86796000CE4F7D /* PrefsWindow.m */; };
|
||||
|
@ -483,6 +484,8 @@
|
|||
A25FCDDE0A37695F002BCBBE /* ResumeSelected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ResumeSelected.png; path = macosx/Images/ResumeSelected.png; sourceTree = "<group>"; };
|
||||
A261A8250C6A0D68003BAFDA /* Error.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Error.png; path = macosx/Images/Error.png; sourceTree = "<group>"; };
|
||||
A261F1DB0A69A1610002815A /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Growl.framework; path = macosx/Growl.framework; sourceTree = "<group>"; };
|
||||
A26397530D0F714300D36DF2 /* ActionPopUpButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ActionPopUpButton.h; path = macosx/ActionPopUpButton.h; sourceTree = "<group>"; };
|
||||
A26397540D0F714300D36DF2 /* ActionPopUpButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ActionPopUpButton.m; path = macosx/ActionPopUpButton.m; sourceTree = "<group>"; };
|
||||
A26E75870CB6AA7500226674 /* InfoOptions.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = InfoOptions.png; path = macosx/Images/InfoOptions.png; sourceTree = "<group>"; };
|
||||
A26E75950CB6AB4800226674 /* InfoGeneral.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = InfoGeneral.png; path = macosx/Images/InfoGeneral.png; sourceTree = "<group>"; };
|
||||
A2710E740A86796000CE4F7D /* PrefsWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PrefsWindow.h; path = macosx/PrefsWindow.h; sourceTree = "<group>"; };
|
||||
|
@ -776,6 +779,8 @@
|
|||
4D364D9F091FBB2C00377D12 /* TorrentTableView.m */,
|
||||
4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */,
|
||||
4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */,
|
||||
A26397530D0F714300D36DF2 /* ActionPopUpButton.h */,
|
||||
A26397540D0F714300D36DF2 /* ActionPopUpButton.m */,
|
||||
A2BF078E0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.h */,
|
||||
A2BF078F0B066E0800757C92 /* SpeedLimitToTurtleIconTransformer.m */,
|
||||
A21F5C010AF26DD5008CE5CE /* ActionMenuSpeedToDisplayLimitTransformer.h */,
|
||||
|
@ -1726,6 +1731,7 @@
|
|||
A20BFFB70D091CC700CE5D2B /* ToolbarSegmentedCell.m in Sources */,
|
||||
3C7A11950D0B2EE300B5701F /* getgateway.c in Sources */,
|
||||
3C7A11960D0B2EE300B5701F /* natpmp.c in Sources */,
|
||||
A26397550D0F714300D36DF2 /* ActionPopUpButton.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2007 Transmission authors and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface ActionPopUpButton : NSPopUpButton
|
||||
{
|
||||
NSImage * fImage;
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,68 @@
|
|||
/******************************************************************************
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (c) 2007 Transmission authors and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "ActionPopUpButton.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
|
||||
@implementation ActionPopUpButton
|
||||
|
||||
//only needed on tiger
|
||||
|
||||
- (id) initWithCoder: (NSCoder *) coder
|
||||
{
|
||||
if ((self = [super initWithCoder: coder]))
|
||||
{
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
fImage = [NSImage imageNamed: @"ActionGear.png"];
|
||||
[fImage setFlipped: YES];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
[(NSPopUpButtonCell *)[self cell] setArrowPosition: NSPopUpNoArrow];
|
||||
[[[self menu] itemAtIndex: 0] setImage: nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawRect: (NSRect) rect
|
||||
{
|
||||
[super drawRect: rect];
|
||||
|
||||
if ([NSApp isOnLeopardOrBetter])
|
||||
return;
|
||||
|
||||
NSSize imageSize = [fImage size];
|
||||
NSRect imageRect = NSMakeRect(rect.origin.x + (rect.size.width - imageSize.width) * 0.5,
|
||||
rect.origin.y + (rect.size.height - imageSize.height) * 0.5, imageSize.width, imageSize.height);
|
||||
|
||||
[fImage drawInRect: imageRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0];
|
||||
}
|
||||
|
||||
@end
|
|
@ -240,6 +240,14 @@
|
|||
<key>SUPERCLASS</key>
|
||||
<string>NSObject</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FilterButton</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSButton</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>ACTIONS</key>
|
||||
<dict>
|
||||
|
@ -280,11 +288,11 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
<string>FilterButton</string>
|
||||
<string>ActionPopUpButton</string>
|
||||
<key>LANGUAGE</key>
|
||||
<string>ObjC</string>
|
||||
<key>SUPERCLASS</key>
|
||||
<string>NSButton</string>
|
||||
<string>NSPopUpButton</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CLASS</key>
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
<integer>5</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>1480</integer>
|
||||
<integer>1041</integer>
|
||||
<integer>2351</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>9B18</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 612 B |
Loading…
Reference in New Issue