vlc | branch: master | Marvin Scholz <epira...@gmail.com> | Wed Mar  4 15:35:22 
2020 +0100| [565e21f4d0621398aa70343aaf1a534f200c7085] | committer: Marvin 
Scholz

macosx: remove support for the language argument

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

 bin/darwinvlc.m | 37 +++++++++++--------------------------
 1 file changed, 11 insertions(+), 26 deletions(-)

diff --git a/bin/darwinvlc.m b/bin/darwinvlc.m
index 7ddbdd19fd..fbefc316a6 100644
--- a/bin/darwinvlc.m
+++ b/bin/darwinvlc.m
@@ -229,33 +229,18 @@ int main(int i_argc, const char *ppsz_argv[])
     /* overwrite system language on Mac */
     char *lang = NULL;
 
-    for (int i = 0; i < i_argc; i++) {
-        if (!strncmp(ppsz_argv[i], "--language", 10)) {
-            lang = strstr(ppsz_argv[i], "=");
-            ppsz_argv++, i_argc--;
-            continue;
-        }
-    }
-    if (lang && strncmp( lang, "auto", 4 )) {
-        char tmp[11];
-        snprintf(tmp, 11, "LANG%s", lang);
-        putenv(tmp);
-    }
-
-    if (!lang) {
-        CFStringRef language;
-        language = (CFStringRef)CFPreferencesCopyAppValue(CFSTR("language"),
-                                                          
kCFPreferencesCurrentApplication);
-        if (language) {
-            lang = FromCFString(language, kCFStringEncodingUTF8);
-            if (strncmp( lang, "auto", 4 )) {
-                char tmp[11];
-                snprintf(tmp, 11, "LANG=%s", lang);
-                putenv(tmp);
-            }
-            free(lang);
-            CFRelease(language);
+    CFStringRef language;
+    language = (CFStringRef)CFPreferencesCopyAppValue(CFSTR("language"),
+                                                      
kCFPreferencesCurrentApplication);
+    if (language) {
+        lang = FromCFString(language, kCFStringEncodingUTF8);
+        if (strncmp( lang, "auto", 4 )) {
+            char tmp[11];
+            snprintf(tmp, 11, "LANG=%s", lang);
+            putenv(tmp);
         }
+        free(lang);
+        CFRelease(language);
     }
 
     ppsz_argv++; i_argc--; /* skip executable path */

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to