Commit 4b13c40d authored by Yoann Peronneau's avatar Yoann Peronneau

* modules/control/hotkeys.c: check if there is a vout before writing some OSD,...

* modules/control/hotkeys.c: check if there is a vout before writing some OSD, since hotkeys can also be called from an interface now.
* modules/gui/ncurses/ncurses.c: don't add empty ('') entry, in the open function
parent 9998197a
......@@ -239,6 +239,8 @@ static void Run( intf_thread_t *p_intf )
{
audio_volume_t i_newvol;
aout_VolumeUp( p_intf, 1, &i_newvol );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -250,10 +252,13 @@ static void Run( intf_thread_t *p_intf )
2*i_newvol*100/AOUT_VOLUME_MAX );
}
}
}
else if( i_action == ACTIONID_VOL_DOWN )
{
audio_volume_t i_newvol;
aout_VolumeDown( p_intf, 1, &i_newvol );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -264,6 +269,7 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, "Vol %d%%",
2*i_newvol*100/AOUT_VOLUME_MAX );
}
}
}
else if( i_action == ACTIONID_SUBDELAY_DOWN )
......@@ -370,6 +376,8 @@ static void Run( intf_thread_t *p_intf )
{
val.i_time = 10000000;
var_Set( p_input, "time-offset", val );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -380,10 +388,13 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, _( "Jump +10 seconds" ) );
}
}
}
else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN && b_seekable )
{
val.i_time = -60000000;
var_Set( p_input, "time-offset", val );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -394,10 +405,13 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, _( "Jump -1 minute" ) );
}
}
}
else if( i_action == ACTIONID_JUMP_FORWARD_1MIN && b_seekable )
{
val.i_time = 60000000;
var_Set( p_input, "time-offset", val );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -408,11 +422,14 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, _( "Jump +1 minute" ) );
}
}
}
else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN && b_seekable )
{
vout_OSDMessage( p_intf, _( "Jump -5 minutes" ) );
val.i_time = -300000000;
var_Set( p_input, "time-offset", val );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -423,10 +440,13 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, _( "Jump -5 minutes" ) );
}
}
}
else if( i_action == ACTIONID_JUMP_FORWARD_5MIN && b_seekable )
{
val.i_time = 300000000;
var_Set( p_input, "time-offset", val );
if( p_vout )
{
if( !p_vout->p_parent_intf || p_vout->b_fullscreen )
{
vout_OSDSlider( VLC_OBJECT( p_intf ),
......@@ -437,6 +457,7 @@ static void Run( intf_thread_t *p_intf )
vout_OSDMessage( p_intf, _( "Jump +5 minutes" ) );
}
}
}
else if( i_action == ACTIONID_NEXT )
{
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......
......@@ -491,7 +491,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
return 1;
case KEY_ENTER:
case 0x0d:
if( p_playlist )
if( p_playlist && i_chain_len > 0 )
{
playlist_Add( p_playlist, p_sys->psz_open_chain,
p_sys->psz_open_chain,
......
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