[vlc-devel] [PATCH 2/2] hotkeys: Added OSD messages for toggle loop tri-state playlist action.

Rémi Denis-Courmont remi at remlab.net
Tue Apr 23 18:59:16 CEST 2013


Le mardi 23 avril 2013 13:15:51, Zoran Turalija a écrit :
> Closes ticket #7933
> 
> Based on "loop" part of John French patch:
> 
>     http://patches.videolan.org/patch/1071/
> ---
>  modules/control/hotkeys.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
> index cfec996..5961acf 100644
> --- a/modules/control/hotkeys.c
> +++ b/modules/control/hotkeys.c
> @@ -172,18 +172,29 @@ static int PutAction( intf_thread_t *p_intf, int
> i_action )
> 
>          /* Playlist actions (including audio) */
>          case ACTIONID_LOOP:
> +        {
>              /* Toggle Normal -> Loop -> Repeat -> Normal ... */
> +            const char *mode;
>              if( var_GetBool( p_playlist, "repeat" ) )
> +            {
>                  var_SetBool( p_playlist, "repeat", false );
> +                mode = "Off";
> +            }
>              else
>              if( var_GetBool( p_playlist, "loop" ) )
>              { /* FIXME: this is not atomic, we should use a real tristate
> */ var_SetBool( p_playlist, "loop", false );
>                  var_SetBool( p_playlist, "repeat", true );
> +                mode = "One";
>              }
>              else
> +            {
>                  var_SetBool( p_playlist, "loop", true );
> +                mode = "All";
> +            }
> +            DisplayMessage( p_vout, _("Loop: %s"), mode );

Why is the mode not localized?

>              break;
> +        }
> 
>          case ACTIONID_RANDOM:
>          {

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list