[vlc-devel] [PATCH 1/3] macosx: reenable audio items on osd

David Fuhrmann david.fuhrmann at googlemail.com
Sat Jan 21 08:16:45 CET 2012


Hello,

I have reconsidered the situation and currently I am not really convinced that this feature should be implemented into the core.

The problem is: Only the GUI knows, if e.g. the action "mute" is triggered in response of a mouse click on a mute button, after changing something at the volume sliders, or using the appropriate hot key. Only in the last case the osd stuff should be displayed. So it seems to me that it is not too bad when we implement that into the GUI.
(An alternative can be to indicate aout_VolumeUp and aout_VolumeDown as functions only for the hot keys and create a new function or a bool argument to handle the mute case. But that seems not really elegant, too.)

Currently, the changed functions are only called from the main menu (which also handle the shortcuts). mute is also called when clicking the mute button at the control bar, where a different icon for the mute state is needed when you do not show the osd, IMHO.

I can look if the changes can be put elsewhere to really handle only the hot keys. Or do you have a better idea?

Am 21.01.2012 um 00:36 schrieb Rémi Denis-Courmont:

> Please don't use action IDs (except for real hotkeys). We have better 
> functions for this.

Yeah, I understand that. But the action IDs are used quite often in the osx gui (also for non hot key stuff), so can you say me what are these better functions? 
Are there dedicated functions to additionally trigger the audio osd items in the appropriate cases, and should I use them instead of the action ids?

With best regards,
David

> 
> On Friday 20 January 2012, David Fuhrmann wrote:
>> This reverts commit 0f3ee76af70c5e27ca9fe67238a59a3cc594cf93.
>> 
>> As suggested in trac. fixes #5837
>> ---
>> modules/gui/macosx/CoreInteraction.m |    9 +++------
>> 1 files changed, 3 insertions(+), 6 deletions(-)
>> 
>> diff --git a/modules/gui/macosx/CoreInteraction.m
>> b/modules/gui/macosx/CoreInteraction.m index 2044c42..7722752 100644
>> --- a/modules/gui/macosx/CoreInteraction.m
>> +++ b/modules/gui/macosx/CoreInteraction.m
>> @@ -409,20 +409,17 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
>> 
>> - (void)volumeUp
>> {
>> -    playlist_t * p_playlist = pl_Get( VLCIntf );
>> -    aout_VolumeUp( p_playlist, 1, NULL );
>> +    var_SetInteger( VLCIntf->p_libvlc, "key-action", ACTIONID_VOL_UP );
>> }
>> 
>> - (void)volumeDown
>> {
>> -    playlist_t * p_playlist = pl_Get( VLCIntf );
>> -    aout_VolumeDown( p_playlist, 1, NULL );
>> +    var_SetInteger( VLCIntf->p_libvlc, "key-action", ACTIONID_VOL_DOWN );
>> }
>> 
>> - (void)mute
>> {
>> -    playlist_t * p_playlist = pl_Get( VLCIntf );
>> -    aout_ToggleMute( p_playlist, NULL );
>> +    var_SetInteger( VLCIntf->p_libvlc, "key-action", ACTIONID_VOL_MUTE );
>> }
>> 
>> - (BOOL)isMuted
> -- 
> Rémi Denis-Courmont
> http://www.remlab.info
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel




More information about the vlc-devel mailing list