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
87b64a6b
Commit
87b64a6b
authored
Aug 25, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/MainWindow: fixed mute toggle and removed some minor code duplication
parent
fe17d440
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.h
+1
-0
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+9
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+2
-5
No files found.
modules/gui/macosx/CoreInteraction.h
View file @
87b64a6b
...
...
@@ -64,6 +64,7 @@
-
(
void
)
volumeUp
;
-
(
void
)
volumeDown
;
-
(
void
)
toggleMute
;
-
(
BOOL
)
performDragOperation
:(
id
<
NSDraggingInfo
>
)
sender
;
...
...
modules/gui/macosx/CoreInteraction.m
View file @
87b64a6b
...
...
@@ -446,6 +446,15 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
aout_VolumeDown
(
pl_Get
(
p_intf
),
1
,
NULL
);
}
-
(
void
)
toggleMute
{
intf_thread_t
*
p_intf
=
VLCIntf
;
if
(
!
p_intf
)
return
;
aout_MuteToggle
(
pl_Get
(
p_intf
)
);
}
-
(
void
)
setMute
:(
BOOL
)
b_value
{
intf_thread_t
*
p_intf
=
VLCIntf
;
...
...
modules/gui/macosx/MainWindow.m
View file @
87b64a6b
...
...
@@ -1204,9 +1204,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
sender
==
o_volume_sld
)
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
[
sender
intValue
]];
else
if
(
sender
==
o_volume_down_btn
)
{
[[
VLCCoreInteraction
sharedInstance
]
setMute
:
YES
];
}
[[
VLCCoreInteraction
sharedInstance
]
toggleMute
];
else
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
AOUT_VOLUME_MAX
];
}
...
...
@@ -1568,8 +1566,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
-
(
void
)
updateVolumeSlider
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
int
i_volume
=
lroundf
(
aout_VolumeGet
(
p_playlist
)
*
AOUT_VOLUME_DEFAULT
);
int
i_volume
=
[[
VLCCoreInteraction
sharedInstance
]
volume
];
BOOL
b_muted
=
[[
VLCCoreInteraction
sharedInstance
]
mute
];
if
(
!
b_muted
)
...
...
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