From: Matthew Judy Date: Mon, 27 Jan 2003 10:37:02 +0000 (+0000) Subject: Cleaning up a bit, and testing SyncMail. PLEASE DO NOT CHANGE THE ITKIT TARGET SETTI... X-Git-Tag: v0.1~74 X-Git-Url: http://git.ithinksw.org/ITKit.git/commitdiff_plain/78553c25bacdbd190fd14591420cf4f7fa578617 Cleaning up a bit, and testing SyncMail. PLEASE DO NOT CHANGE THE ITKIT TARGET SETTINGS WITHOUT CONTACTING MATT. THIS MEANS YOU. --- diff --git a/ITTableCornerView.h b/ITTableCornerView.h index a8b582c..43afa7e 100755 --- a/ITTableCornerView.h +++ b/ITTableCornerView.h @@ -12,22 +12,8 @@ * */ -/* - * This subclass does 4 things to approximate NSMenuExtra's functionality: - * - * 1. Makes the status item smarter about highlighting. - * 2. Allows you to set an alternate (inverted) image. - * 3. Eliminates the pre-Jaguar shadow behind a normal status item. - * 4. If you use an image AND title, the text will be made slightly smaller - * to resemble the visual interface of an NSMenuExtra. - * - * Note: In order to have the shadow not overlap the bottom of the - * menubar, Apple moves the image up one pixel. Since that shadow is - * no longer drawn, please adjust your images DOWN one pixel to compensate. - * - */ -#import +#import @interface ITTableCornerView : NSPopUpButton { NSTableHeaderCell *headerCell; diff --git a/ITTableCornerView.m b/ITTableCornerView.m index 256c808..4f90316 100755 --- a/ITTableCornerView.m +++ b/ITTableCornerView.m @@ -1,11 +1,3 @@ -// -// ITTableCornerView.m -// -// -// Created by Joseph Spiros on Wed Jan 22 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - #import "ITTableCornerView.h" @implementation ITTableCornerView diff --git a/ITTableView.h b/ITTableView.h index 5661c74..c0b2439 100755 --- a/ITTableView.h +++ b/ITTableView.h @@ -13,8 +13,9 @@ * */ -#import -#import "ITTableCornerView.h" +#import + +@class ITTableCornerView; @interface ITTableView : NSTableView { ITTableCornerView *corner; diff --git a/ITTableView.m b/ITTableView.m index 613a441..7cba72b 100755 --- a/ITTableView.m +++ b/ITTableView.m @@ -1,6 +1,5 @@ -// ITTableView.m - #import "ITTableView.h" +#import "ITTableCornerView.h" @implementation ITTableView diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h index af6d277..1d1a218 100755 --- a/ITTransientStatusWindow.h +++ b/ITTransientStatusWindow.h @@ -18,6 +18,10 @@ #import +@class ITTextField; +@class ITGrayRoundedView; + + #define DEFAULT_EXIT_DELAY 3.0 diff --git a/ITTransientStatusWindow.m b/ITTransientStatusWindow.m index 4182d57..098bd2d 100755 --- a/ITTransientStatusWindow.m +++ b/ITTransientStatusWindow.m @@ -4,6 +4,8 @@ #import "ITTextField.h" #import "ITGrayRoundedView.h" +@class ITTextField; +@class ITGrayRoundedView; /*************************************************************************/ #pragma mark - @@ -129,7 +131,7 @@ static ITTransientStatusWindow *staticWindow = nil; - (void)orderFront:(id)sender { - if ( _exitMode = ITTransientStatusWindowExitAfterDelay ) { + if ( _exitMode == ITTransientStatusWindowExitAfterDelay ) { // set the timer, and orderOut: when it lapses. } @@ -142,7 +144,7 @@ static ITTransientStatusWindow *staticWindow = nil; - (void)makeKeyAndOrderFront:(id)sender { - if ( _exitMode = ITTransientStatusWindowExitAfterDelay ) { + if ( _exitMode == ITTransientStatusWindowExitAfterDelay ) { // set the timer, and orderOut: when it lapses. } @@ -194,7 +196,7 @@ static ITTransientStatusWindow *staticWindow = nil; return _visibilityState; } -- (ITTransientStatusWindowExitMode)ExitMode +- (ITTransientStatusWindowExitMode)exitMode { return _exitMode; } @@ -297,35 +299,46 @@ static ITTransientStatusWindow *staticWindow = nil; if ( _entryEffect == ITTransientStatusWindowEffectDissolve ) { [self dissolveEffect:YES]; } else if ( _entryEffect == ITTransientStatusWindowEffectSlideVertically ) { - [self slideEffect:YES]; + [self slideVerticalEffect:YES]; } else if ( _entryEffect == ITTransientStatusWindowEffectSlideHorizontally ) { - [self slideEffect:YES]; + [self slideHorizontalEffect:YES]; } } else if ( _visibilityState == ITTransientStatusWindowVisibleState ) { if ( _exitEffect == ITTransientStatusWindowEffectDissolve ) { [self dissolveEffect:NO]; } else if ( _exitEffect == ITTransientStatusWindowEffectSlideVertically ) { - [self slideEffect:NO]; + [self slideVerticalEffect:NO]; } else if ( _exitEffect == ITTransientStatusWindowEffectSlideHorizontally ) { - [self slideEffect:NO]; + [self slideHorizontalEffect:NO]; } } } - (void)dissolveEffect:(BOOL)entering { - - [super orderFront:self]; + if ( entering ) { + [super orderFront:self]; + } else { + [super orderOut:self]; + } } - (void)slideVerticalEffect:(BOOL)entering { - [super orderFront:self]; + if ( entering ) { + [super orderFront:self]; + } else { + [super orderOut:self]; + } } - (void)slideHorizontalEffect:(BOOL)entering { - [super orderFront:self]; + if ( entering ) { + [super orderFront:self]; + } else { + [super orderOut:self]; + } } diff --git a/Showcase/Controller.h b/Showcase/Controller.h index 85492f3..46c871d 100755 --- a/Showcase/Controller.h +++ b/Showcase/Controller.h @@ -21,12 +21,11 @@ // ITTransientStatusWindow Support ITTransientStatusWindow *statusWindow; - IBOutlet NSTextView *swSampleTextView; - IBOutlet NSPopUpButton *swVanishModePopup; - IBOutlet NSPopUpButton *swBackgroundTypePopup; - IBOutlet NSPopUpButton *swDefinedPositionPopup; - IBOutlet NSTextField *swVanishDelay; - IBOutlet NSMatrix *swVanishOnClick; + IBOutlet NSTextView *swSampleTextView; + IBOutlet NSPopUpButton *swVanishModePopup; + IBOutlet NSPopUpButton *swBackgroundTypePopup; + IBOutlet NSPopUpButton *swDefinedPositionPopup; + IBOutlet NSTextField *swVanishDelay; } // ITStatusItem Support @@ -41,5 +40,6 @@ // ITTransientStatusWindow Support - (IBAction)buildStatusWindow:(id)sender; - (IBAction)showStatusWindow:(id)sender; +- (IBAction)hideStatusWindow:(id)sender; @end diff --git a/Showcase/Controller.m b/Showcase/Controller.m index a2ca8d9..8998a38 100755 --- a/Showcase/Controller.m +++ b/Showcase/Controller.m @@ -247,6 +247,10 @@ animate:YES]; } +- (IBAction)hideStatusWindow:(id)sender +{ + [statusWindow orderOut:self]; +} /*************************************************************************/ #pragma mark - diff --git a/Showcase/English.lproj/MainMenu.nib/classes.nib b/Showcase/English.lproj/MainMenu.nib/classes.nib index d3f715c..e064a23 100755 --- a/Showcase/English.lproj/MainMenu.nib/classes.nib +++ b/Showcase/English.lproj/MainMenu.nib/classes.nib @@ -3,6 +3,7 @@ { ACTIONS = { buildStatusWindow = id; + hideStatusWindow = id; showStatusWindow = id; toggleCastsShadow = id; toggleImage = id; @@ -22,7 +23,6 @@ swSampleTextView = NSTextView; swVanishDelay = NSTextField; swVanishModePopup = NSPopUpButton; - swVanishOnClick = NSMatrix; tabView = ITTabView; testTextField = ITTextField; useInvertedCheckBox = NSButton; diff --git a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib index c45f757..c54ceb5 100755 Binary files a/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib and b/Showcase/English.lproj/MainMenu.nib/keyedobjects.nib differ