summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueMultiSelectionViewController.m
blob: cdea56052a252204f66c51b25e391d3241a67533 (plain)
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
/*  HBQueueEmptyViewController.m $

 This file is part of the HandBrake source code.
 Homepage: <http://handbrake.fr/>.
 It may be used under the terms of the GNU General Public License. */

#import "HBQueueMultiSelectionViewController.h"

@interface HBQueueMultiSelectionViewController ()

@property (nonatomic, weak) IBOutlet NSTextField *label;

@end

@implementation HBQueueMultiSelectionViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self updateLabels];
}

- (void)updateLabels
{
    if (self.count == 0)
    {
        self.label.stringValue = NSLocalizedString(@"No job selected", @"");
    }
    else
    {
        self.label.stringValue = [NSString stringWithFormat:NSLocalizedString(@"%lu jobs selected", @""), (unsigned long)self.count];
    }
}

- (void)setCount:(NSUInteger)count
{
    _count = count;
    [self updateLabels];
}

@end