From: Matthew Judy Date: Mon, 27 Jan 2003 09:02:07 +0000 (+0000) Subject: ITKit For MenuTunes X-Git-Tag: v0.1~78 X-Git-Url: http://git.ithinksw.org/ITKit.git/commitdiff_plain/35167b10d151b0ae09f0f807670c318bc4d3de53 ITKit For MenuTunes Phase 1: Removal of Moved Files Checkin of Modified Existing Files This checkin removes the ITChasingArrow stuff from the ITKit root, since it now lives in the "Deprecated" directory. It also checks in the changes to the existing classes. --- diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings index 2b75ad7..e711269 100755 Binary files a/English.lproj/InfoPlist.strings and b/English.lproj/InfoPlist.strings differ diff --git a/ITChasingArrow1.tiff b/ITChasingArrow1.tiff deleted file mode 100755 index 2c87a94..0000000 Binary files a/ITChasingArrow1.tiff and /dev/null differ diff --git a/ITChasingArrow10.tiff b/ITChasingArrow10.tiff deleted file mode 100755 index 0a27697..0000000 Binary files a/ITChasingArrow10.tiff and /dev/null differ diff --git a/ITChasingArrow2.tiff b/ITChasingArrow2.tiff deleted file mode 100755 index abda131..0000000 Binary files a/ITChasingArrow2.tiff and /dev/null differ diff --git a/ITChasingArrow3.tiff b/ITChasingArrow3.tiff deleted file mode 100755 index 37a3d6b..0000000 Binary files a/ITChasingArrow3.tiff and /dev/null differ diff --git a/ITChasingArrow4.tiff b/ITChasingArrow4.tiff deleted file mode 100755 index 5653961..0000000 Binary files a/ITChasingArrow4.tiff and /dev/null differ diff --git a/ITChasingArrow5.tiff b/ITChasingArrow5.tiff deleted file mode 100755 index 5e6a93d..0000000 Binary files a/ITChasingArrow5.tiff and /dev/null differ diff --git a/ITChasingArrow6.tiff b/ITChasingArrow6.tiff deleted file mode 100755 index 5aed596..0000000 Binary files a/ITChasingArrow6.tiff and /dev/null differ diff --git a/ITChasingArrow7.tiff b/ITChasingArrow7.tiff deleted file mode 100755 index f10726f..0000000 Binary files a/ITChasingArrow7.tiff and /dev/null differ diff --git a/ITChasingArrow8.tiff b/ITChasingArrow8.tiff deleted file mode 100755 index a1ac918..0000000 Binary files a/ITChasingArrow8.tiff and /dev/null differ diff --git a/ITChasingArrow9.tiff b/ITChasingArrow9.tiff deleted file mode 100755 index f00c467..0000000 Binary files a/ITChasingArrow9.tiff and /dev/null differ diff --git a/ITChasingArrowsView.h b/ITChasingArrowsView.h deleted file mode 100755 index bdc2a80..0000000 --- a/ITChasingArrowsView.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * ITKit - * ITStatusItem - * NSStatusItem subclass which reduces suckage - * - * Original Author : Doug Brown - * Responsibility : Matt Judy - * Responsibility : Joseph Spiros - * - * Copyright (c) 2002 iThink Software. - * All Rights Reserved - * - */ - -#import - - -@interface ITChasingArrowsView : NSView -{ - BOOL running, inForeground; - int curIndex; - NSTimer *timer; - NSArray *images; -} - -- (IBAction)stop:(id)sender; -- (IBAction)start:(id)sender; - -@end diff --git a/ITChasingArrowsView.m b/ITChasingArrowsView.m deleted file mode 100755 index c32bb6c..0000000 --- a/ITChasingArrowsView.m +++ /dev/null @@ -1,172 +0,0 @@ -// -// ITChasingArrowsView.m -// -// -// Created by Doug Brown on Sat May 11 2002. -// Copyright (c) 2002 iThink Software. All rights reserved. -// - -#import "ITChasingArrowsView.h" - - -@implementation ITChasingArrowsView - -- (id)initWithCoder:(NSCoder *)decoder -{ - self = [super initWithCoder:decoder]; - - running = NO; - - images = [[decoder decodeObject] retain]; - - curIndex = 0; - timer = nil; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder -{ - [super encodeWithCoder:coder]; - - [coder encodeObject:images]; -} - -- (id)initWithFrame:(NSRect)frame { - self = [super initWithFrame:frame]; - if (self) { - NSBundle *bund = [NSBundle bundleForClass:[self class]]; - running = NO; - images = [[NSArray alloc] initWithObjects: - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow1.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow2.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow3.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow4.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow5.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow6.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow7.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow8.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow9.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow10.tiff"]] autorelease], - nil]; - - curIndex = 0; - timer = nil; - } - return self; -} - -- (void)dealloc -{ - if (timer) - { - [timer invalidate]; - [timer release]; - timer = nil; - } - [images release]; - - [super dealloc]; -} -- (void)drawRect:(NSRect)rect { - - if (running) - { - NSImage *curImage = [images objectAtIndex:curIndex]; - float amt; - if (inForeground) - { - amt = 1.0; - } - else - { - amt = 0.5; - } - [curImage compositeToPoint:NSMakePoint(0,0) operation:NSCompositeSourceOver fraction:amt]; - } - else - { - // draw nothing. - } -} - -- (IBAction)stop:(id)sender -{ - running = NO; - - if (timer) - { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self]; - [timer invalidate]; - [timer release]; - timer = nil; - } - - [self setNeedsDisplay:YES]; -} - -- (IBAction)start:(id)sender -{ - if (!timer) - { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self selector:@selector(appWentToBackground:) name:NSApplicationWillResignActiveNotification object:nil]; - [nc addObserver:self selector:@selector(appWentToForeground:) name:NSApplicationWillBecomeActiveNotification object:nil]; - [nc addObserver:self selector:@selector(windowWentToBackground:) name:NSWindowDidResignMainNotification object:nil]; - [nc addObserver:self selector:@selector(windowWentToForeground:) name:NSWindowDidBecomeMainNotification object:nil]; - inForeground = ([NSApp isActive] && [[self window] isMainWindow]); - curIndex = 0; - running = YES; - timer = [[NSTimer scheduledTimerWithTimeInterval:0.05 - target:self - selector:@selector(showNewImage:) - userInfo:nil - repeats:YES] retain]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode]; - } -} - -- (void)showNewImage:(NSTimer *)t -{ - [self setNeedsDisplay:YES]; - - if (curIndex == 9) - { - curIndex = 0; - } - else - { - curIndex++; - } -} - -- (void)appWentToBackground:(NSNotification *)note -{ - inForeground = NO; -} - -- (void)appWentToForeground:(NSNotification *)note -{ - inForeground = YES; -} - -- (void)windowWentToBackground:(NSNotification *)note -{ - NSWindow *window = [note object]; - if (window == [self window]) - { - inForeground = NO; - } -} - -- (void)windowWentToForeground:(NSNotification *)note -{ - NSWindow *window = [note object]; - if (window == [self window]) - { - inForeground = YES; - } -} - -@end diff --git a/ITKit.h b/ITKit.h index 7168191..95c6aad 100755 --- a/ITKit.h +++ b/ITKit.h @@ -1,5 +1,22 @@ +/* + * ITKit + * iThink Software's custom extensions to Apple's AppKit framework + * + * Original Author : Matt Judy + * Responsibility : Matt Judy + * Responsibility : Joseph Spiros + * + * Copyright (c) 2002 - 2003 iThink Software. + * All Rights Reserved + * + */ + #import -#import #import +#import #import +#import +#import + +#import diff --git a/ITStatusItem.h b/ITStatusItem.h index ae4f71a..8efb87b 100755 --- a/ITStatusItem.h +++ b/ITStatusItem.h @@ -7,7 +7,7 @@ * Responsibility : Matt Judy * Responsibility : Joseph Spiros * - * Copyright (c) 2002 iThink Software. + * Copyright (c) 2002 - 2003 iThink Software. * All Rights Reserved * */ @@ -27,6 +27,7 @@ * */ + #import @@ -43,4 +44,5 @@ - (NSImage*) alternateImage; - (void) setAlternateImage:(NSImage*)image; + @end diff --git a/ITStatusItem.m b/ITStatusItem.m index d0bcb9f..fcef033 100755 --- a/ITStatusItem.m +++ b/ITStatusItem.m @@ -94,4 +94,5 @@ [self setAttributedTitle:attrTitle]; } + @end diff --git a/ITTabView.h b/ITTabView.h index 1c109c8..5b4795a 100755 --- a/ITTabView.h +++ b/ITTabView.h @@ -7,7 +7,7 @@ * Responsibility : Matt Judy * Responsibility : Kent Sutherland * - * Copyright (c) 2002 iThink Software. + * Copyright (c) 2002 - 2003 iThink Software. * All Rights Reserved * */ @@ -16,8 +16,10 @@ * This subclass enables drag-and-drop for tab view items. */ + #import + @interface ITTabView : NSTabView { NSTabViewItem *_draggedTab; @@ -29,4 +31,5 @@ - (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index; + @end diff --git a/ITTabView.m b/ITTabView.m index d601171..3ca1938 100755 --- a/ITTabView.m +++ b/ITTabView.m @@ -78,4 +78,5 @@ [super mouseDragged:event]; } + @end