Largo: The ITKit is not l33t. I will make it l33t.
authorMatthew Judy <mjudy@ithinksw.com>
Sat, 7 Dec 2002 15:11:51 +0000 (15:11 +0000)
committerMatthew Judy <mjudy@ithinksw.com>
Sat, 7 Dec 2002 15:11:51 +0000 (15:11 +0000)
English.lproj/InfoPlist.strings
ITChasingArrowsView.h
ITKit.h [new file with mode: 0755]
ITStatusItem.h
ITStatusItem.m
iThinkAppKit.h [deleted file]

index 94fa65d..2b75ad7 100755 (executable)
Binary files a/English.lproj/InfoPlist.strings and b/English.lproj/InfoPlist.strings differ
index 4991cb6..bdc2a80 100755 (executable)
@@ -1,20 +1,29 @@
-//
-//  ITChasingArrowsView.h
-//  
-//
-//  Created by Doug Brown on Sat May 11 2002.
-//  Copyright (c) 2002 iThink Software. All rights reserved.
-//
+/*
+ *     ITKit
+ *  ITStatusItem
+ *    NSStatusItem subclass which reduces suckage
+ *
+ *  Original Author : Doug Brown
+ *   Responsibility : Matt Judy <mjudy@ithinksw.com>
+ *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *
+ *  Copyright (c) 2002 iThink Software.
+ *  All Rights Reserved
+ *
+ */
 
 #import <AppKit/AppKit.h>
 
 
-@interface ITChasingArrowsView : NSView {
+@interface ITChasingArrowsView : NSView
+{
     BOOL running, inForeground;
     int curIndex;
     NSTimer *timer;
     NSArray *images;
 }
+
 - (IBAction)stop:(id)sender;
 - (IBAction)start:(id)sender;
+
 @end
diff --git a/ITKit.h b/ITKit.h
new file mode 100755 (executable)
index 0000000..b4a974c
--- /dev/null
+++ b/ITKit.h
@@ -0,0 +1,4 @@
+#import <Cocoa/Cocoa.h>
+
+#import <ITKit/ITChasingArrowsView.h>
+#import <ITKit/ITStatusItem.h>
\ No newline at end of file
index 904e962..2824f9b 100755 (executable)
@@ -1,18 +1,27 @@
-//
-//  ITStatusItem.h
-//  iThinkAppKit
-//
-//  Created by Joseph Spiros on Fri Dec 06 2002.
-//  Copyright (c) 2002 iThink Software. All rights reserved.
-//
+/*
+ *     ITKit
+ *  ITStatusItem
+ *    NSStatusItem subclass which reduces suckage
+ *
+ *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *   Responsibility : Matt Judy <mjudy@ithinksw.com>
+ *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *
+ *  Copyright (c) 2002 iThink Software.
+ *  All Rights Reserved
+ *
+ */
 
-#import <AppKit/AppKit.h>
+#import <Cocoa/Cocoa.h>
 
 
-@interface ITStatusItem : NSStatusItem {
-    NSStatusItem *statusItem;
+@interface ITStatusItem : NSStatusItem
+{
 }
-- (NSStatusItem*) statusItem;
+
+- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length;
+
 - (NSImage*) alternateImage;
 - (void) setAlternateImage:(NSImage*)image;
+
 @end
index 3e2ce57..1b51ca2 100755 (executable)
@@ -1,33 +1,58 @@
-//
-//  ITStatusItem.m
-//  iThinkAppKit
-//
-//  Created by Joseph Spiros on Fri Dec 06 2002.
-//  Copyright (c) 2002 iThink Software. All rights reserved.
-//
-
 #import "ITStatusItem.h"
 
+/*************************************************************************/
+#pragma mark -
+#pragma mark EVIL HACKERY
+/*************************************************************************/
+
+// This stuff is actually implemented by the AppKit.
+// We declare it here to cancel out warnings.
+
+@interface NSStatusBarButton : NSButton
+@end
+
+@interface NSStatusItem (HACKHACKHACKHACK)
+- (id) _initInStatusBar:(NSStatusBar*)statusBar
+             withLength:(float)length
+           withPriority:(int)priority;
+- (NSStatusBarButton*) _button;
+@end
+
 
 @implementation ITStatusItem
 
-- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length {
-    statusItem = [statusBar statusItemWithLength:length];
+/*************************************************************************/
+#pragma mark -
+#pragma mark INITIALIZATION METHODS
+/*************************************************************************/
+
+- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length
+{
+    if ( ( self = [super _initInStatusBar:statusBar
+                               withLength:length
+                             withPriority:1000] ) ) {
+                             
+        //Eliminate the fucking shadow...
+        [[[self _button] cell] setType:NSNullCellType];
+        
+        //Be something other than a dumbshit about highlighting...
+        [self setHighlightMode:YES];
+    }
+    return self;
 }
 
-- (NSStatusItem*) statusItem {
-    return statusItem;
-}
+
+/*************************************************************************/
+#pragma mark -
+#pragma mark ACCESSOR METHODS
+/*************************************************************************/
 
 - (NSImage*) alternateImage {
-    return [[statusItem _button] alternateImage];
+    return [[self _button] alternateImage];
 }
 
 - (void) setAlternateImage:(NSImage*)image {
-    if ([[[[statusItem _button] cell] super] type] != 0) {
-        [[[statusItem _button] cell] setType:0];
-    }
-    [[statusItem _button] setAlternateImage:image];
+    [[self _button] setAlternateImage:image];
 }
 
 @end
diff --git a/iThinkAppKit.h b/iThinkAppKit.h
deleted file mode 100755 (executable)
index 590b523..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#import <Cocoa/Cocoa.h>
-#import <iThinkAppKit/ITChasingArrowsView.h>
-#import <iThinkAppKit/ITStatusItem.h>
\ No newline at end of file