Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ffff39ac
Commit
ffff39ac
authored
Nov 09, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: add GUI setting/getter for --language
parent
4dbe3de4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1494 additions
and
35 deletions
+1494
-35
extras/package/macosx/Resources/English.lproj/Preferences.xib
...as/package/macosx/Resources/English.lproj/Preferences.xib
+1345
-35
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.h
+2
-0
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+147
-0
No files found.
extras/package/macosx/Resources/English.lproj/Preferences.xib
View file @
ffff39ac
This diff is collapsed.
Click to expand it.
modules/gui/macosx/simple_prefs.h
View file @
ffff39ac
...
...
@@ -84,6 +84,8 @@
IBOutlet
id
o_input_urlhandler_btn
;
IBOutlet
id
o_input_view
;
IBOutlet
id
o_intf_language_pop
;
IBOutlet
id
o_intf_language_txt
;
IBOutlet
id
o_intf_style_txt
;
IBOutlet
id
o_intf_style_dark_bcell
;
IBOutlet
id
o_intf_style_bright_bcell
;
...
...
modules/gui/macosx/simple_prefs.m
View file @
ffff39ac
...
...
@@ -40,6 +40,135 @@
#import <Sparkle/Sparkle.h> //for o_intf_last_update_lbl
static
const
char
*
const
ppsz_language
[]
=
{
"auto"
,
"en"
,
"ar"
,
"bn"
,
"pt_BR"
,
"en_GB"
,
"el"
,
"bg"
,
"ca"
,
"zh_TW"
,
"cs"
,
"cy"
,
"da"
,
"nl"
,
"fi"
,
"et"
,
"eu"
,
"fr"
,
"ga"
,
"gd"
,
"gl"
,
"ka"
,
"de"
,
"he"
,
"hr"
,
"hu"
,
"hy"
,
"is"
,
"id"
,
"it"
,
"ja"
,
"ko"
,
"lt"
,
"mn"
,
"ms"
,
"nb"
,
"nn"
,
"kk"
,
"km"
,
"ne"
,
"oc"
,
"fa"
,
"pl"
,
"pt_PT"
,
"pa"
,
"ro"
,
"ru"
,
"zh_CN"
,
"si"
,
"sr"
,
"sk"
,
"sl"
,
"ckb"
,
"es"
,
"sv"
,
"te"
,
"tr"
,
"uk"
,
"vi"
,
"wa"
,
NULL
,
};
static
const
char
*
const
ppsz_language_text
[]
=
{
N_
(
"Auto"
),
"American English"
,
"ﻉﺮﺒﻳ"
,
"বাংলা"
,
"Português Brasileiro"
,
"British English"
,
"Νέα Ελληνικά"
,
"български език"
,
"Català"
,
"正體中文"
,
"Čeština"
,
"Cymraeg"
,
"Dansk"
,
"Nederlands"
,
"Suomi"
,
"eesti keel"
,
"Euskara"
,
"Français"
,
"Gaeilge"
,
"Gàidhlig"
,
"Galego"
,
"ქართული"
,
"Deutsch"
,
"עברית"
,
"hrvatski"
,
"Magyar"
,
"հայերեն"
,
"íslenska"
,
"Bahasa Indonesia"
,
"Italiano"
,
"日本語"
,
"한국어"
,
"lietuvių"
,
"Монгол хэл"
,
"Melayu"
,
"Bokmål"
,
"Nynorsk"
,
"Қазақ тілі"
,
"ភាសាខ្មែរ"
,
"नेपाली"
,
"Occitan"
,
"ﻑﺍﺮﺳی"
,
"Polski"
,
"Português"
,
"ਪੰਜਾਬੀ"
,
"Română"
,
"Русский"
,
"简体中文"
,
"සිංහල"
,
"српски"
,
"Slovensky"
,
"slovenščina"
,
"کوردیی سۆرانی"
,
"Español"
,
"Svenska"
,
"తెలుగు"
,
"Türkçe"
,
"украї́нська мо́ва"
,
"tiếng Việt"
,
"Walon"
,
};
static
NSString
*
VLCSPrefsToolbarIdentifier
=
@"Our Simple Preferences Toolbar Identifier"
;
static
NSString
*
VLCIntfSettingToolbarIdentifier
=
@"Intf Settings Item Identifier"
;
static
NSString
*
VLCAudioSettingToolbarIdentifier
=
@"Audio Settings Item Identifier"
;
...
...
@@ -223,6 +352,7 @@ create_toolbar_item(NSString * o_itemIdent, NSString * o_name, NSString * o_desc
[
o_urlhandler_cancel_btn
setTitle
:
_NS
(
"Cancel"
)];
/* interface */
[
o_intf_language_txt
setStringValue
:
_NS
(
"Language"
)];
[
o_intf_style_txt
setStringValue
:
_NS
(
"Interface style"
)];
[
o_intf_style_dark_bcell
setTitle
:
_NS
(
"Dark"
)];
[
o_intf_style_bright_bcell
setTitle
:
_NS
(
"Bright"
)];
...
...
@@ -422,6 +552,18 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
/**********************
* interface settings *
**********************/
NSUInteger
sel
=
0
;
const
char
*
pref
=
NULL
;
pref
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"language"
]
UTF8String
];
for
(
int
x
=
0
;
ppsz_language
[
x
]
!=
NULL
;
x
++
)
{
[
o_intf_language_pop
addItemWithTitle
:[
NSString
stringWithUTF8String
:
ppsz_language_text
[
x
]]];
if
(
pref
)
{
if
(
!
strcmp
(
ppsz_language
[
x
],
pref
))
sel
=
x
;
}
}
[
o_intf_language_pop
selectItemAtIndex
:
sel
];
[
self
setupButton
:
o_intf_art_pop
forIntList
:
"album-art"
];
[
self
setupButton
:
o_intf_fspanel_ckb
forBoolValue
:
"macosx-fspanel"
];
...
...
@@ -802,6 +944,11 @@ static inline void save_module_list(intf_thread_t * p_intf, id object, const cha
* interface settings *
**********************/
if
(
b_intfSettingChanged
)
{
NSUInteger
index
=
[
o_intf_language_pop
indexOfSelectedItem
];
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
[
defaults
setObject
:[
NSString
stringWithUTF8String
:
ppsz_language
[
index
]]
forKey
:
@"language"
];
[
defaults
synchronize
];
SaveIntList
(
o_intf_art_pop
,
"album-art"
);
config_PutInt
(
p_intf
,
"macosx-fspanel"
,
[
o_intf_fspanel_ckb
state
]);
...
...
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