[vlc-commits] macosx: fixed appearance issue within the playback speed widget when using a RTL language (close #7475)
Felix Paul Kühne
git at videolan.org
Sun Sep 16 16:03:17 CEST 2012
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Sep 16 16:02:49 2012 +0200| [7b3d502bdb5a28c22e03c4dcca6d16fbb696f92f] | committer: Felix Paul Kühne
macosx: fixed appearance issue within the playback speed widget when using a RTL language (close #7475)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b3d502bdb5a28c22e03c4dcca6d16fbb696f92f
---
extras/package/macosx/Resources/English.lproj/MainMenu.xib | 10 ++++++----
modules/gui/macosx/MainMenu.m | 9 +++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.xib b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
index 8a5ad07..eecd6d5 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.xib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.xib
@@ -21,8 +21,9 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="4948"/>
<integer value="21"/>
+ <integer value="4948"/>
+ <integer value="4596"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -4041,14 +4042,14 @@ LCAuLi4</string>
<string key="NSClassName">SUUpdater</string>
</object>
<object class="NSCustomView" id="560875128">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="103751139">
<reference key="NSNextResponder" ref="560875128"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{227, 35}, {62.796900000000001, 18}}</string>
+ <string key="NSFrame">{{19, 35}, {270.79689999999999, 18}}</string>
<reference key="NSSuperview" ref="560875128"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="385075814">
@@ -4164,7 +4165,7 @@ LCAuLi4</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="647762012">
<int key="NSCellFlags">605028416</int>
- <int key="NSCellFlags2">272761856</int>
+ <int key="NSCellFlags2">4326400</int>
<string key="NSContents">Slower</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="421148087"/>
@@ -4195,6 +4196,7 @@ LCAuLi4</string>
</object>
</object>
<string key="NSFrameSize">{307, 53}</string>
+ <reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSCustomView" id="256817023">
diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m
index 0991a5f..48c287e 100644
--- a/modules/gui/macosx/MainMenu.m
+++ b/modules/gui/macosx/MainMenu.m
@@ -118,6 +118,15 @@ static VLCMainMenu *_o_sharedInstance = nil;
selector: @selector(applicationWillFinishLaunching:)
name: NSApplicationWillFinishLaunchingNotification
object: nil];
+
+ /* check whether the user runs OSX with a RTL language */
+ NSArray* languages = [NSLocale preferredLanguages];
+ NSString* preferredLanguage = [languages objectAtIndex:0];
+
+ if ([NSLocale characterDirectionForLanguage:preferredLanguage] == NSLocaleLanguageDirectionRightToLeft) {
+ msg_Dbg(VLCIntf, "adapting interface since '%s' is a RTL language", [preferredLanguage UTF8String]);
+ [o_mi_rate_fld setAlignment: NSLeftTextAlignment];
+ }
}
- (void)applicationWillFinishLaunching:(NSNotification *)o_notification
More information about the vlc-commits
mailing list