[vlc-commits] macosx/MainWindow: add accessibility support to the customizable buttons ( refs #495)

Felix Paul Kühne git at videolan.org
Sat Aug 25 14:32:46 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Aug 25 14:32:41 2012 +0200| [ff3f75bad87fa7d2a918f58d2e97adc5fbc711fc] | committer: Felix Paul Kühne

macosx/MainWindow: add accessibility support to the customizable buttons (refs #495)

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

 modules/gui/macosx/MainWindow.m |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index c5e93f6..805ff23 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -199,13 +199,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_detached_play_btn setToolTip: [o_play_btn toolTip]];
     [[o_detached_play_btn cell] accessibilitySetOverrideValue:_NS("Click to play or pause the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_bwd_btn setToolTip: _NS("Backward")];
-    [[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold pressed to skip backwards through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_detached_bwd_btn setToolTip: [o_bwd_btn toolTip]];
-    [[o_detached_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold pressed to skip backwards through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_detached_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_fwd_btn setToolTip: _NS("Forward")];
-    [[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold pressed to skip forwards through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_detached_fwd_btn setToolTip: [o_fwd_btn toolTip]];
-    [[o_detached_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold pressed to skip forwards through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_detached_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_stop_btn setToolTip: _NS("Stop")];
     [[o_stop_btn cell] accessibilitySetOverrideValue:_NS("Click to stop playback.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_playlist_btn setToolTip: _NS("Show/Hide Playlist")];
@@ -701,6 +701,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_prev_btn setTarget:self];
     [o_prev_btn setAction:@selector(prev:)];
     [o_prev_btn setToolTip: _NS("Previous")];
+    [[o_prev_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_prev_btn setEnabled: b_enabled];
 
     o_next_btn = [[NSButton alloc] initWithFrame:preliminaryFrame];
@@ -712,8 +713,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_next_btn setTarget:self];
     [o_next_btn setAction:@selector(next:)];
     [o_next_btn setToolTip: _NS("Next")];
+    [[o_next_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item.") forAttribute:NSAccessibilityDescriptionAttribute];
     [o_next_btn setEnabled: b_enabled];
 
+    /* change the accessibility help for the backward/forward buttons accordingly */
+    [[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click and hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click and hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+
     NSRect frame;
     float f_space = 32.;
     #define moveItem( item ) \
@@ -782,6 +788,10 @@ static VLCMainWindow *_o_sharedInstance = nil;
     [o_prev_btn release];
     [o_next_btn release];
 
+    /* change the accessibility help for the backward/forward buttons accordingly */
+    [[o_bwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the previous playlist item. Hold to skip backward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+    [[o_fwd_btn cell] accessibilitySetOverrideValue:_NS("Click to go to the next playlist item. Hold to skip forward through the current media.") forAttribute:NSAccessibilityDescriptionAttribute];
+
     NSRect frame;
     float f_space = 32.;
     #define moveItem( item ) \



More information about the vlc-commits mailing list