vlc | branch: master | Zoran Turalija <[email protected]> | Tue Apr 23
11:23:25 2013 +0200| [c751120fb5c26944180528815ab2623a6e3dc77d] | committer:
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: Rémi Denis-Courmont <[email protected]>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c751120fb5c26944180528815ab2623a6e3dc77d
---
modules/control/hotkeys.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index be13004..5645940 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 = N_("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 = N_("One");
}
else
+ {
var_SetBool( p_playlist, "loop", true );
+ mode = N_("All");
+ }
+ DisplayMessage( p_vout, _("Loop: %s"), vlc_gettext(mode) );
break;
+ }
case ACTIONID_RANDOM:
{
_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits