summaryrefslogtreecommitdiffstats
path: root/macosx/HBQueueMultiSelectionViewController.m
blob: f0e5b63f0e1dcd10f285a536496c4ff11f8af9b6 (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(@"%llu jobs selected", @""), self.count];
    }
}

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

@end