Commit 5e331152 authored by Marvin Scholz's avatar Marvin Scholz

macosx: Make VLCFSPanelController accessible

This re-adds the accessibility strings that were present in the old
fullscreen controller.
parent d62d9148
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11542" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11761" systemVersion="16B2657" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11542"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11761"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="system font weights other than Regular or Bold" minToolsVersion="7.0"/>
</dependencies>
......@@ -14,6 +14,7 @@
<outlet property="controlsView" destination="Npt-C5-K77" id="Dnt-ku-O6u"/>
<outlet property="elapsedTime" destination="nJc-M4-sMF" id="DFf-yw-e6A"/>
<outlet property="forwardButton" destination="jSN-hV-r5D" id="3PN-jP-xPY"/>
<outlet property="fullscreenButton" destination="C5K-aX-3aJ" id="AGc-uy-2b0"/>
<outlet property="heightMaxConstraint" destination="Vwe-uz-fKC" id="yz0-Rh-MKt"/>
<outlet property="mediaTitle" destination="Vd8-0f-Usz" id="NZ0-KY-l4T"/>
<outlet property="nextButton" destination="2ai-dB-Wpq" id="Axl-RO-LfI"/>
......
......@@ -40,6 +40,7 @@
@property IBOutlet NSButton *backwardButton;
@property IBOutlet NSButton *nextButton;
@property IBOutlet NSButton *previousButton;
@property IBOutlet NSButton *fullscreenButton;
@property IBOutlet NSTextField *mediaTitle;
@property IBOutlet VLCTimeField *elapsedTime;
@property IBOutlet VLCTimeField *remainingOrTotalTime;
......
......@@ -71,9 +71,49 @@
[self injectBackgroundView];
#endif
/* TODO: Write custom Image-only button subclass to behave properly */
[(NSButtonCell*)[_playPauseButton cell] setHighlightsBy:NSPushInCellMask];
[(NSButtonCell*)[_playPauseButton cell] setShowsStateBy:NSContentsCellMask];
[self setupControls];
}
#define setupButton(target, title, desc) \
[target accessibilitySetOverrideValue:title \
forAttribute:NSAccessibilityTitleAttribute]; \
[target accessibilitySetOverrideValue:desc \
forAttribute:NSAccessibilityDescriptionAttribute]; \
[target setToolTip:desc];
- (void)setupControls
{
/* Setup translations for buttons */
setupButton(_playPauseButton,
_NS("Play/Pause"),
_NS("Click to play or pause the current media."));
setupButton(_nextButton,
_NS("Next"),
_NS("Click to go to the next playlist item."));
setupButton(_previousButton,
_NS("Previous"),
_NS("Click to go to the previous playlist item."));
setupButton(_forwardButton,
_NS("Forward"),
_NS("Click and hold to skip forward through the current media."));
setupButton(_backwardButton,
_NS("Backward"),
_NS("Click and hold to skip backward through the current media."));
setupButton(_fullscreenButton,
_NS("Toggle Fullscreen mode"),
_NS("Click to exit fullscreen playback."));
setupButton(_volumeSlider,
_NS("Volume"),
_NS("Drag to adjust the volume."));
setupButton(_timeSlider,
_NS("Position"),
_NS("Drag to adjust the current playback position."));
/* Setup other controls */
[_volumeSlider setMaxValue:[[VLCCoreInteraction sharedInstance] maxVolume]];
[_volumeSlider setIntValue:AOUT_VOLUME_DEFAULT];
}
......
......@@ -556,6 +556,8 @@ modules/gui/macosx/VLCExtensionsDialogProvider.h
modules/gui/macosx/VLCExtensionsDialogProvider.m
modules/gui/macosx/VLCExtensionsManager.h
modules/gui/macosx/VLCExtensionsManager.m
modules/gui/macosx/VLCFSPanelController.h
modules/gui/macosx/VLCFSPanelController.m
modules/gui/macosx/helpers.h
modules/gui/macosx/macosx.m
modules/gui/macosx/VLCMain.h
......
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