diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-26 10:52:13 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-26 10:52:13 +0000 |
commit | 7b2694e9f6c35d9f50c3fb3cf38b0fc766478162 (patch) | |
tree | c4e3d07a6bb51de884f53312a96d05849f072db1 /cocoa/PSMTabBarControl/PSMProgressIndicator.m | |
parent | a663cf8f84942e1147d1d2f3db292308639c7fa5 (diff) | |
download | netsurf-7b2694e9f6c35d9f50c3fb3cf38b0fc766478162.tar.gz netsurf-7b2694e9f6c35d9f50c3fb3cf38b0fc766478162.tar.bz2 |
Updated PSMTabBarControl source code to version from https://github.com/dergraf83/PSMTabBarControl
svn path=/trunk/netsurf/; revision=11490
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMProgressIndicator.m')
-rw-r--r-- | cocoa/PSMTabBarControl/PSMProgressIndicator.m | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/cocoa/PSMTabBarControl/PSMProgressIndicator.m b/cocoa/PSMTabBarControl/PSMProgressIndicator.m index f79852a26..983609bbc 100644 --- a/cocoa/PSMTabBarControl/PSMProgressIndicator.m +++ b/cocoa/PSMTabBarControl/PSMProgressIndicator.m @@ -7,21 +7,34 @@ // #import "PSMProgressIndicator.h" +#import "PSMTabBarControl.h" + +@interface PSMTabBarControl (PSMProgressIndicatorExtensions) + +- (void)update; + +@end @implementation PSMProgressIndicator -// overrides to make tab bar control re-layout things if status changes -- (void)setHidden:(BOOL)flag +- (id) initWithFrame: (NSRect)frameRect; { - [super setHidden:flag]; - [(PSMTabBarControl *)[self superview] update]; + if ((self = [super initWithFrame: frameRect]) == nil) return nil; + [self setControlSize: NSSmallControlSize]; + return self; } -- (void)stopAnimation:(id)sender -{ +// 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]; + selector:@selector(startAnimation:) + object:nil]; [super stopAnimation:sender]; } + @end |