[vlc-commits] macosx/main window controlsbar: remove dependency on core interaction singleton

Felix Paul Kühne git at videolan.org
Sat Apr 13 22:10:03 CEST 2019


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Sat Apr 13 21:45:13 2019 +0200| [45eb33cb93a7e71b8ac2e39a9a0c0ae782fcb552] | committer: Felix Paul Kühne

macosx/main window controlsbar: remove dependency on core interaction singleton

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45eb33cb93a7e71b8ac2e39a9a0c0ae782fcb552
---

 .../gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m b/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
index 28fdaff477..7c6181984b 100644
--- a/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
+++ b/modules/gui/macosx/windows/mainwindow/VLCMainWindowControlsBar.m
@@ -25,7 +25,6 @@
 
 #import <vlc_aout.h>
 
-#import "coreinteraction/VLCCoreInteraction.h"
 #import "main/CompatibilityFixes.h"
 #import "main/VLCMain.h"
 #import "menus/VLCMainMenu.h"
@@ -138,9 +137,9 @@
     [self.shuffleButton setImage: _shuffleImage];
     [self.shuffleButton setAlternateImage: _pressedShuffleImage];
 
-    BOOL b_mute = ![[VLCCoreInteraction sharedInstance] mute];
+    BOOL b_mute = ![_playerController mute];
     [self.volumeSlider setEnabled: b_mute];
-    [self.volumeSlider setMaxValue: [[VLCCoreInteraction sharedInstance] maxVolume]];
+    [self.volumeSlider setMaxValue: AOUT_VOLUME_MAX];
     [self.volumeSlider setDefaultValue: AOUT_VOLUME_DEFAULT];
     [self.volumeUpButton setEnabled: b_mute];
 
@@ -390,11 +389,11 @@
 - (IBAction)volumeAction:(id)sender
 {
     if (sender == self.volumeSlider)
-        [[VLCCoreInteraction sharedInstance] setVolume: [sender intValue]];
+        [_playerController setVolume: [sender floatValue]];
     else if (sender == self.volumeDownButton)
-        [[VLCCoreInteraction sharedInstance] toggleMute];
+        [_playerController toggleMute];
     else
-        [[VLCCoreInteraction sharedInstance] setVolume: AOUT_VOLUME_MAX];
+        [_playerController setVolume: AOUT_VOLUME_MAX];
 }
 
 - (IBAction)effects:(id)sender



More information about the vlc-commits mailing list