Commit 7e21fe9a authored by Felix Paul Kühne's avatar Felix Paul Kühne Committed by Jean-Baptiste Kempf

macosx: improve handling the mute action in the main window. disable slider...

macosx: improve handling the mute action in the main window. disable slider and fullvolume button in case mute is active. (fixes #5800)
(cherry picked from commit df8a9d08)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 71d3328f
......@@ -21,16 +21,16 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2770"/>
<integer value="1617"/>
<integer value="4756"/>
<integer value="915"/>
<integer value="4895"/>
<integer value="29"/>
<integer value="2770"/>
<integer value="2730"/>
<integer value="4596"/>
<integer value="21"/>
<integer value="4722"/>
<integer value="915"/>
<integer value="4596"/>
<integer value="283"/>
<integer value="4895"/>
<integer value="2730"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -969,7 +969,7 @@
<string key="NSContents"/>
<reference key="NSSupport" ref="188716167"/>
<reference key="NSControlView" ref="474770834"/>
<int key="NSButtonFlags">-2039217921</int>
<int key="NSButtonFlags">141820159</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage" id="267511931">
<string key="NSClassName">NSImage</string>
......@@ -1020,7 +1020,7 @@
<string key="NSContents"/>
<reference key="NSSupport" ref="188716167"/>
<reference key="NSControlView" ref="963106097"/>
<int key="NSButtonFlags">-2039217921</int>
<int key="NSButtonFlags">141820159</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage" id="112655283">
<string key="NSClassName">NSImage</string>
......
......@@ -73,7 +73,6 @@
BOOL b_nativeFullscreenMode;
BOOL b_video_playback_enabled;
int i_lastShownVolume;
BOOL b_mute;
input_state_e cachedInputState;
NSImage * o_pause_img;
......
......@@ -232,6 +232,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_shuffle_btn setAlternateImage: o_shuffle_pressed_img];
[o_play_btn setImage: o_play_img];
[o_play_btn setAlternateImage: o_play_pressed_img];
BOOL b_mute = ![[VLCCoreInteraction sharedInstance] isMuted];
[o_volume_sld setEnabled: b_mute];
[o_volume_up_btn setEnabled: b_mute];
/* interface builder action */
[self setDelegate: self];
......@@ -673,7 +676,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (sender == o_volume_sld)
[[VLCCoreInteraction sharedInstance] setVolume: [sender intValue]];
else if (sender == o_volume_down_btn)
{
[[VLCCoreInteraction sharedInstance] mute];
[o_volume_sld setIntValue: 0];
BOOL b_mute = ![[VLCCoreInteraction sharedInstance] isMuted];
[o_volume_sld setEnabled: b_mute];
[o_volume_up_btn setEnabled: b_mute];
}
else
[[VLCCoreInteraction sharedInstance] setVolume: AOUT_VOLUME_MAX];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment