vlc | branch: master | David Fuhrmann <[email protected]> | Fri Apr 14 13:42:15 2017 +0200| [b01f1d367c8704c1a15a51a8b94481e745fc527c] | committer: David Fuhrmann
macosx: error panel: support right to left languages close #17262 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b01f1d367c8704c1a15a51a8b94481e745fc527c --- modules/gui/macosx/UI/ErrorPanel.xib | 2 +- modules/gui/macosx/VLCErrorWindowController.m | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/gui/macosx/UI/ErrorPanel.xib b/modules/gui/macosx/UI/ErrorPanel.xib index 59227b57e3..efe0947aa8 100644 --- a/modules/gui/macosx/UI/ErrorPanel.xib +++ b/modules/gui/macosx/UI/ErrorPanel.xib @@ -47,7 +47,7 @@ <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> </tableColumn> <tableColumn identifier="error_msg" width="343.99560000000002" minWidth="39.995609999999999" maxWidth="1000" id="10"> - <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="errors"> + <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="errors"> <font key="font" metaFont="smallSystem"/> <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" white="0.33333299" alpha="1" colorSpace="calibratedWhite"/> diff --git a/modules/gui/macosx/VLCErrorWindowController.m b/modules/gui/macosx/VLCErrorWindowController.m index fc305bc70a..5a386e63a5 100644 --- a/modules/gui/macosx/VLCErrorWindowController.m +++ b/modules/gui/macosx/VLCErrorWindowController.m @@ -26,6 +26,23 @@ #import "VLCStringUtility.h" +@implementation NSTableView (RTLSupport) + +- (void)reverseColumnOrder { + + if ([[NSApplication sharedApplication] userInterfaceLayoutDirection] != NSUserInterfaceLayoutDirectionRightToLeft) + return; + + NSUInteger index = self.tableColumns.count - 1; + + while (index > 0) { + [self moveColumn:0 toColumn:index]; + index--; + } +} + +@end + @interface VLCErrorWindowController() { @@ -54,6 +71,7 @@ /* init strings */ [self.window setTitle: _NS("Errors and Warnings")]; [self.cleanupButton setTitle: _NS("Clean up")]; + [self.errorTable reverseColumnOrder]; } - (void)addError:(NSString *)title withMsg:(NSString *)message; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
