Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a24db0a7
Commit
a24db0a7
authored
Nov 10, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bin/darwinvlc: fix l10n preferences lookup code
parent
ffff39ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
bin/darwinvlc.c
bin/darwinvlc.c
+14
-8
No files found.
bin/darwinvlc.c
View file @
a24db0a7
...
...
@@ -168,23 +168,29 @@ int main( int i_argc, const char *ppsz_argv[] )
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
)
{
if
(
CFStringGetLength
(
language
)
>
0
)
lang
=
(
char
*
)
CFStringGetCStringPtr
(
language
,
kCFStringEncodingUTF8
);
CFIndex
length
=
CFStringGetLength
(
language
)
+
1
;
if
(
length
>
0
)
{
CFIndex
maxSize
=
CFStringGetMaximumSizeForEncoding
(
length
,
kCFStringEncodingUTF8
);
lang
=
(
char
*
)
malloc
(
maxSize
);
CFStringGetCString
(
language
,
lang
,
maxSize
-
1
,
kCFStringEncodingUTF8
);
}
char
tmp
[
11
];
snprintf
(
tmp
,
11
,
"LANG=%s"
,
lang
);
putenv
(
tmp
);
CFRelease
(
language
);
}
}
if
(
lang
&&
strncmp
(
lang
,
"auto"
,
4
))
{
char
tmp
[
11
];
snprintf
(
tmp
,
11
,
"LANG%s"
,
lang
);
putenv
(
tmp
);
}
#endif
ppsz_argv
++
;
i_argc
--
;
/* skip executable path */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment