Commit c751120f authored by Zoran Turalija's avatar Zoran Turalija Committed by Rémi Denis-Courmont

hotkeys: Added OSD messages for toggle loop tri-state playlist action.

Closes ticket #7933

Based on "loop" part of John French patch:

    http://patches.videolan.org/patch/1071/

Modified-and-...
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 0dc62cd1
...@@ -172,18 +172,29 @@ static int PutAction( intf_thread_t *p_intf, int i_action ) ...@@ -172,18 +172,29 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
/* Playlist actions (including audio) */ /* Playlist actions (including audio) */
case ACTIONID_LOOP: case ACTIONID_LOOP:
{
/* Toggle Normal -> Loop -> Repeat -> Normal ... */ /* Toggle Normal -> Loop -> Repeat -> Normal ... */
const char *mode;
if( var_GetBool( p_playlist, "repeat" ) ) if( var_GetBool( p_playlist, "repeat" ) )
{
var_SetBool( p_playlist, "repeat", false ); var_SetBool( p_playlist, "repeat", false );
mode = N_("Off");
}
else else
if( var_GetBool( p_playlist, "loop" ) ) if( var_GetBool( p_playlist, "loop" ) )
{ /* FIXME: this is not atomic, we should use a real tristate */ { /* FIXME: this is not atomic, we should use a real tristate */
var_SetBool( p_playlist, "loop", false ); var_SetBool( p_playlist, "loop", false );
var_SetBool( p_playlist, "repeat", true ); var_SetBool( p_playlist, "repeat", true );
mode = N_("One");
} }
else else
{
var_SetBool( p_playlist, "loop", true ); var_SetBool( p_playlist, "loop", true );
mode = N_("All");
}
DisplayMessage( p_vout, _("Loop: %s"), vlc_gettext(mode) );
break; break;
}
case ACTIONID_RANDOM: case ACTIONID_RANDOM:
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment