[vlc-commits] darwinvlc: fix automatic language selection (close #9914)
Felix Paul Kühne
git at videolan.org
Sun Nov 24 20:37:21 CET 2013
vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Nov 24 20:35:05 2013 +0100| [36c6ddd848ee43bb58bf67dbbbcc8648d44d1475] | committer: Felix Paul Kühne
darwinvlc: fix automatic language selection (close #9914)
(cherry picked from commit c6e4493dcdab713bc70d0efb2154d08dce57cde1)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=36c6ddd848ee43bb58bf67dbbbcc8648d44d1475
---
NEWS | 1 +
bin/darwinvlc.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index e493f63..56571b6 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Decoders:
Mac OS X interface:
* Fix issue which prevented to enable more than one video filter on Mavericks
+ * Fix an issue which could prevent automatic UI language settings from working
* Option to control VLC's iTunes pausing behavior is more easy to find
* Improved UI resetting when requested in the preferences
diff --git a/bin/darwinvlc.c b/bin/darwinvlc.c
index 33bb4f3..9bac3ca 100644
--- a/bin/darwinvlc.c
+++ b/bin/darwinvlc.c
@@ -185,9 +185,11 @@ int main( int i_argc, const char *ppsz_argv[] )
lang = (char *)malloc(maxSize);
CFStringGetCString(language, lang, maxSize - 1, kCFStringEncodingUTF8);
}
- char tmp[11];
- snprintf(tmp, 11, "LANG=%s", lang);
- putenv(tmp);
+ if (strncmp( lang, "auto", 4 )) {
+ char tmp[11];
+ snprintf(tmp, 11, "LANG=%s", lang);
+ putenv(tmp);
+ }
CFRelease(language);
}
}
More information about the vlc-commits
mailing list