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
ebce4183
Commit
ebce4183
authored
Jan 04, 2013
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: audio effects panel: small fixes for eq presets management
parent
cec6c32f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/AudioEffects.m
+16
-9
No files found.
modules/gui/macosx/AudioEffects.m
View file @
ebce4183
...
...
@@ -476,35 +476,42 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
-
(
void
)
updatePresetSelector
{
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
presets
=
[
defaults
objectForKey
:
@"EQNames"
];
[
o_eq_presets_popup
removeAllItems
];
[
o_eq_presets_popup
addItemsWithTitles
:[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
@"EQTitles"
]];
[[
o_eq_presets_popup
menu
]
addItem
:[
NSMenuItem
separatorItem
]];
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
"Add new Preset..."
)];
[[
o_eq_presets_popup
lastItem
]
setTarget
:
self
];
[[
o_eq_presets_popup
lastItem
]
setAction
:
@selector
(
addPresetAction
:)];
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
"Organize Presets..."
)];
[[
o_eq_presets_popup
lastItem
]
setTarget
:
self
];
[[
o_eq_presets_popup
lastItem
]
setAction
:
@selector
(
deletePresetAction
:)];
if
([
presets
count
]
>
1
)
{
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
"Organize Presets..."
)];
[[
o_eq_presets_popup
lastItem
]
setTarget
:
self
];
[[
o_eq_presets_popup
lastItem
]
setAction
:
@selector
(
deletePresetAction
:)];
}
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
NSArray
*
presets
=
[
defaults
objectForKey
:
@"EQNames"
];
NSString
*
currentPreset
=
[
NSString
stringWithFormat
:
@"%s"
,
var_GetNonEmptyString
(
p_object
,
"equalizer-preset"
)];
NSInteger
currentPresetIndex
=
0
;
vlc_object_release
(
p_object
);
NSUInteger
currentPresetIndex
=
0
;
if
([
currentPreset
length
]
>
0
)
{
currentPresetIndex
=
[
presets
indexOfObjectPassingTest
:
^
(
id
obj
,
NSUInteger
idx
,
BOOL
*
stop
)
{
return
[
obj
isEqualToString
:
currentPreset
];
}];
}
if
(
currentPresetIndex
==
NSNotFound
)
currentPresetIndex
=
[
presets
count
]
-
1
;
}
[
o_eq_presets_popup
selectItemAtIndex
:
currentPresetIndex
];
[
o_eq_preamp_sld
setFloatValue
:[[[
defaults
objectForKey
:
@"EQPreampValues"
]
objectAtIndex
:
currentPresetIndex
]
floatValue
]];
[
self
setBandSliderValuesForPreset
:
currentPresetIndex
];
vlc_object_release
(
p_object
);
}
-
(
void
)
equalizerUpdated
...
...
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