Adding a better cancel job to the Pivot effect. Also redoing the showcase interface...
[ITKit.git] / Showcase / Controller.m
index a8914aa..16b5c0b 100755 (executable)
     [statusWindow setExitEffect:[[ITPivotWindowEffect alloc] initWithWindow:statusWindow]];
 }
 
-- (IBAction)showStatusWindow:(id)sender
+- (IBAction)toggleStatusWindow:(id)sender
 {
-    [[statusWindow contentView] setNeedsDisplay:YES];
-    [statusWindow appear:self];
-}
-
-- (IBAction)hideStatusWindow:(id)sender
-{
-    [statusWindow vanish:self];
+    if ( ([statusWindow visibilityState] == ITTransientStatusWindowHiddenState) ||
+         ([statusWindow visibilityState] == ITTransientStatusWindowVanishingState) ) {
+        [[statusWindow contentView] setNeedsDisplay:YES];
+        [statusWindow appear:self];
+    } else {
+        [statusWindow vanish:self];
+    }
 }
 
 - (IBAction)changeWindowSetting:(id)sender
 {
 }
 
+
 /*************************************************************************/
 #pragma mark -
 #pragma mark NSWindow DELEGATE METHODS