diff options
Diffstat (limited to 'frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.m')
-rw-r--r-- | frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.m b/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.m new file mode 100644 index 000000000..4532f31be --- /dev/null +++ b/frontends/cocoa/PSMTabBarControl/PSMProgressIndicator.m @@ -0,0 +1,43 @@ +// +// PSMProgressIndicator.m +// PSMTabBarControl +// +// Created by John Pannell on 2/23/06. +// Copyright 2006 Positive Spin Media. All rights reserved. +// + +#import "PSMProgressIndicator.h" +#import "PSMTabBarControl.h" + +@interface PSMTabBarControl (PSMProgressIndicatorExtensions) + +- (void)update; + +@end + +@implementation PSMProgressIndicator + +- (id)initWithFrame:(NSRect)frameRect +{ + if ((self = [super initWithFrame:frameRect]) == nil) + return nil; + [self setControlSize:NSControlSizeSmall]; + return self; +} + +// overrides to make tab bar control re-layout things if status changes +- (void)setHidden:(BOOL)flag +{ + [super setHidden:flag]; + [(PSMTabBarControl *)[self superview] update]; +} + +- (void)stopAnimation:(id)sender +{ + [NSObject cancelPreviousPerformRequestsWithTarget:self + selector:@selector(startAnimation:) + object:nil]; + [super stopAnimation:sender]; +} + +@end |