Keep the EKEzvOutgoingFileTransfer.m around so long as it is sending, regardless...
[adiumx.git] / Source / AIOutlineViewAnimation.m
blobcf7cae0d595729cda15f1b2ea7c4fd1d4bb71d6e
1 //
2 //  AIOutlineViewAnimation.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 6/9/07.
6 //
8 #import "AIOutlineViewAnimation.h"
9 #import "AIAnimatingListOutlineView.h"
11 @interface AIAnimatingListOutlineView (AIOutlineViewAnimationDelegate)
12 - (void)animation:(AIOutlineViewAnimation *)animation didSetCurrentValue:(float)currentValue forDict:(NSDictionary *)animatingRowsDict;
13 @end
15 @interface AIOutlineViewAnimation (PRIVATE)
16 - (id)initWithDictionary:(NSDictionary *)inDict delegate:(AIAnimatingListOutlineView *)inOutlineView;
17 @end
19 /*!
20  * @class AIOutlineViewAnimation
21  * @brief NSAnimation subclass for AIOutlineView's animations
22  *
23  * This NSAnimation subclass is a simple subclass to let the outline view handle changes in progress
24  * along a non-blocking ease-in/ease-out animation.
25  * AIOutlineView should release the AIOutlineViewAnimation when the animation is complete.
26  */
27 @implementation AIOutlineViewAnimation
28 + (AIOutlineViewAnimation *)listObjectAnimationWithDictionary:(NSDictionary *)inDict delegate:(AIAnimatingListOutlineView *)inOutlineView
30         return [[[self alloc] initWithDictionary:inDict delegate:inOutlineView] autorelease];
33 - (id)initWithDictionary:(NSDictionary *)inDict delegate:(AIAnimatingListOutlineView *)inOutlineView
35         if ((self = [super initWithDuration:LIST_OBJECT_ANIMATION_DURATION animationCurve:NSAnimationEaseInOut])) {
36                 dict = [inDict retain];
38                 [self setDelegate:inOutlineView];
39                 [self setAnimationBlockingMode:NSAnimationNonblocking];
40         }
41         
42         return self;
45 - (void)dealloc
47         [dict release];
49         [super dealloc];
52 /*!
53  * @brief We want to run our animation no matter what's going on
54  */
55 - (NSArray *)runLoopModesForAnimating
57     return [NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, nil];
60 /*!
61  * @brief When progress updates, inform the delegate
62  */
63 - (void)setCurrentProgress:(NSAnimationProgress)progress
65         [super setCurrentProgress:progress];
67         [[self delegate] animation:self didSetCurrentValue:[self currentValue] forDict:dict];
70 @end