forked from taoeffect/DelayedLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImageAndProgressCell.m
42 lines (37 loc) · 1.21 KB
/
ImageAndProgressCell.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// ImageAndProgressCell.m
// DelayedLauncher
//
// Created by Greg Slepak on 3/25/10.
// Copyright 2010 Tao Effect LLC. All rights reserved.
//
#import "ImageAndProgressCell.h"
@implementation ImageAndProgressCell
- (id)initImageCell:(NSImage *)anImage
{
if ( (self = [super initImageCell:anImage]) ) {
NSSize cellSize = [self cellSize];
progress = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(0, 0, cellSize.width, cellSize.height)];
[progress setIndeterminate:YES];
[progress setUsesThreadedAnimation:NO];
[progress setStyle:NSProgressIndicatorSpinningStyle];
[progress startAnimation:nil];
}
return self;
}
//- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
//{
// if ( showProgress && !dontShowThisTime )
// {
// log_debug("drawing frame: center[%g,%g] size[%g,%g]", NSMinX(cellFrame),NSMinY(cellFrame),NSWidth(cellFrame),NSHeight(cellFrame));
// [progress setFrame:cellFrame];
// [controlView lockFocus];
// [progress drawRect:cellFrame];
// [controlView unlockFocus];
// }
// else [super drawWithFrame:cellFrame inView:controlView];
// dontShowThisTime = NO;
//}
ACC_COMBOP_M(BOOL, showProgress, ShowProgress)
ACC_COMBOP_M(BOOL, dontShowThisTime, DontShowThisTime)
@end