summaryrefslogtreecommitdiffstats
path: root/macosx/HBPlayerHUDController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-07-10 20:06:09 +0200
committerDamiano Galassi <[email protected]>2018-07-10 20:06:09 +0200
commitf6a000f1c97f4aa0e4fc6f7751dc5bedb8e3a0bf (patch)
tree966d59d56302aae46ac334d0e2939058ed9ac0e4 /macosx/HBPlayerHUDController.m
parent44d7c56f5551c2b862811c70ae457fd5f2a5c797 (diff)
MacGui: remove a bunch of unneeded compatibility code.
Diffstat (limited to 'macosx/HBPlayerHUDController.m')
-rw-r--r--macosx/HBPlayerHUDController.m17
1 files changed, 7 insertions, 10 deletions
diff --git a/macosx/HBPlayerHUDController.m b/macosx/HBPlayerHUDController.m
index 82b68b494..311a2b0d5 100644
--- a/macosx/HBPlayerHUDController.m
+++ b/macosx/HBPlayerHUDController.m
@@ -32,9 +32,9 @@
return @"HBPlayerHUDController";
}
-- (void)loadView
+- (void)viewDidLoad
{
- [super loadView];
+ [super viewDidLoad];
if ([[NSFont class] respondsToSelector:@selector(monospacedDigitSystemFontOfSize:weight:)]) {
_monospacedAttr = @{NSFontAttributeName: [NSFont monospacedDigitSystemFontOfSize:[NSFont smallSystemFontSize] weight:NSFontWeightRegular]};
@@ -66,23 +66,20 @@
{
[self _buildTracksMenu];
- // 10.7 does not supports weak NSViewController,
- // so use self and disable the warning for now.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Warc-retain-cycles"
+ __weak HBPlayerHUDController *weakSelf = self;
self.periodicObserver = [self.player addPeriodicTimeObserverUsingBlock:^(NSTimeInterval time) {
- [self _refreshUI];
+ [weakSelf _refreshUI];
}];
self.rateObserver = [self.player addRateObserverUsingBlock:^{
- if (self.player.rate != 0.0)
+ if (weakSelf.player.rate != 0.0)
{
- self.playButton.image = [NSImage imageNamed:@"PauseTemplate"];
+ weakSelf.playButton.image = [NSImage imageNamed:@"PauseTemplate"];
}
else
{
- self.playButton.image = [NSImage imageNamed:@"PlayTemplate"];
+ weakSelf.playButton.image = [NSImage imageNamed:@"PlayTemplate"];
}
}];