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
f35551e5
Commit
f35551e5
authored
Jan 20, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simple prefs: robustify and cleanup saving int and string list
parent
ddb643bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+10
-8
No files found.
modules/gui/macosx/simple_prefs.m
View file @
f35551e5
...
...
@@ -871,18 +871,20 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
static
inline
void
save_int_list
(
intf_thread_t
*
p_intf
,
id
object
,
const
char
*
name
)
{
NSNumber
*
p_valueobject
;
p_valueobject
=
(
NSNumber
*
)[[
object
selectedItem
]
representedObject
];
assert
([
p_valueobject
isKindOfClass
:[
NSNumber
class
]]);
if
(
p_valueobject
)
config_PutInt
(
p_intf
,
name
,
[
p_valueobject
intValue
]);
NSNumber
*
p_valueobject
=
(
NSNumber
*
)[[
object
selectedItem
]
representedObject
];
if
(
p_valueobject
)
{
assert
([
p_valueobject
isKindOfClass
:[
NSNumber
class
]]);
config_PutInt
(
p_intf
,
name
,
[
p_valueobject
intValue
]);
}
}
static
inline
void
save_string_list
(
intf_thread_t
*
p_intf
,
id
object
,
const
char
*
name
)
{
NSString
*
p_stringobject
;
p_stringobject
=
(
NSString
*
)[[
object
selectedItem
]
representedObject
];
assert
([
p_stringobject
isKindOfClass
:[
NSString
class
]]);
config_PutPsz
(
p_intf
,
name
,
[
p_stringobject
UTF8String
]);
NSString
*
p_stringobject
=
(
NSString
*
)[[
object
selectedItem
]
representedObject
];
if
(
p_stringobject
)
{
assert
([
p_stringobject
isKindOfClass
:[
NSString
class
]]);
config_PutPsz
(
p_intf
,
name
,
[
p_stringobject
UTF8String
]);
}
}
-
(
void
)
saveChangedSettings
...
...
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