1 #import "ITStatusItem.h"
3 /*************************************************************************/
5 #pragma mark EVIL HACKERY
6 /*************************************************************************/
8 // This stuff is actually implemented by the AppKit.
9 // We declare it here to cancel out warnings.
11 @interface NSStatusBarButton : NSButton
14 @interface NSStatusItem (HACKHACKHACKHACK)
15 - (id) _initInStatusBar:(NSStatusBar*)statusBar
16 withLength:(float)length
17 withPriority:(int)priority;
18 - (NSStatusBarButton*) _button;
22 @implementation ITStatusItem
24 /*************************************************************************/
26 #pragma mark INITIALIZATION METHODS
27 /*************************************************************************/
29 - (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length
31 if ( ( self = [super _initInStatusBar:statusBar
33 withPriority:1000] ) ) {
35 //Eliminate the fucking shadow...
36 [[[self _button] cell] setType:NSNullCellType];
38 //Be something other than a dumbshit about highlighting...
39 [self setHighlightMode:YES];
45 /*************************************************************************/
47 #pragma mark ACCESSOR METHODS
48 /*************************************************************************/
50 - (NSImage*) alternateImage {
51 return [[self _button] alternateImage];
54 - (void) setAlternateImage:(NSImage*)image {
55 [[self _button] setAlternateImage:image];