Commit 7df36400 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Change the "intf-show" variable into a toggle.

At some point in the past, this might have meant something else, but now,
it is implemented as a "Show Fullscreen Controller", in Qt4, skins2 and OSX.
This change reflects this fact.
parent 0dbc7d41
......@@ -147,7 +147,7 @@ typedef enum vlc_action {
ACTIONID_SUBPOS_DOWN,
ACTIONID_AUDIO_TRACK,
ACTIONID_SUBTITLE_TRACK,
ACTIONID_INTF_SHOW,
ACTIONID_INTF_TOGGLE_FSC,
ACTIONID_INTF_HIDE,
ACTIONID_INTF_BOSS,
/* chapter and title navigation */
......
......@@ -218,12 +218,9 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
}
/* Interface showing */
case ACTIONID_INTF_SHOW:
var_SetBool( p_intf->p_libvlc, "intf-show", true );
break;
case ACTIONID_INTF_TOGGLE_FSC:
case ACTIONID_INTF_HIDE:
var_SetBool( p_intf->p_libvlc, "intf-show", false );
var_TriggerCallback( p_intf->p_libvlc, "intf-toggle-fscontrol" );
break;
case ACTIONID_INTF_BOSS:
......
......@@ -558,7 +558,7 @@ static VLCMain *_o_sharedMainInstance = nil;
val.b_bool = false;
var_AddCallback( p_playlist, "fullscreen", FullscreenChanged, self);
var_AddCallback( p_intf->p_libvlc, "intf-show", ShowController, self);
var_AddCallback( p_intf->p_libvlc, "intf-toggle-fscontrol", ShowController, self);
// var_AddCallback(p_playlist, "item-change", PLItemChanged, self);
var_AddCallback(p_playlist, "item-current", PLItemChanged, self);
var_AddCallback(p_playlist, "activity", PLItemChanged, self);
......
......@@ -228,7 +228,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/************
* Callbacks
************/
var_AddCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
var_AddCallback( p_intf->p_libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
var_AddCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
/* Register callback for the intf-popupmenu variable */
......@@ -315,7 +315,7 @@ MainInterface::~MainInterface()
/* Unregister callbacks */
var_DelCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
var_DelCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
var_DelCallback( p_intf->p_libvlc, "intf-toggle-fscontrol", IntfShowCB, p_intf );
var_DelCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
p_intf->p_sys->p_mi = NULL;
......@@ -1321,7 +1321,7 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
}
/*****************************************************************************
* IntfShowCB: callback triggered by the intf-show libvlc variable.
* IntfShowCB: callback triggered by the intf-toggle-fscontrol libvlc variable.
*****************************************************************************/
static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param )
......
......@@ -153,7 +153,7 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
var_AddCallback( p_object, var, onGenericCallback, this );
ADD_CALLBACK( pIntf->p_sys->p_playlist, "volume" )
ADD_CALLBACK( pIntf->p_libvlc, "intf-show" )
ADD_CALLBACK( pIntf->p_libvlc, "intf-toggle-fscontrol" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "item-current" )
ADD_CALLBACK( pIntf->p_sys->p_playlist, "random" )
......@@ -205,7 +205,7 @@ VlcProc::~VlcProc()
var_DelCallback( getIntf()->p_sys->p_playlist, "volume",
onGenericCallback, this );
var_DelCallback( getIntf()->p_libvlc, "intf-show",
var_DelCallback( getIntf()->p_libvlc, "intf-toggle-fscontrol",
onGenericCallback, this );
var_DelCallback( getIntf()->p_sys->p_playlist, "item-current",
......@@ -405,7 +405,7 @@ int VlcProc::onGenericCallback( vlc_object_t *pObj, const char *pVariable,
ADD_CALLBACK_ENTRY( "audio-filter", on_audio_filter_changed, false )
ADD_CALLBACK_ENTRY( "intf-show", on_intf_show_changed, false )
ADD_CALLBACK_ENTRY( "intf-toggle-fscontrol", on_intf_show_changed, false )
ADD_CALLBACK_ENTRY( "mouse-moved", on_mouse_moved_changed, false )
......
......@@ -255,8 +255,7 @@ static const struct action actions[] =
{ "frame-next", ACTIONID_FRAME_NEXT, },
{ "incr-scalefactor", ACTIONID_SCALE_UP, },
{ "intf-boss", ACTIONID_INTF_BOSS, },
{ "intf-hide", ACTIONID_INTF_HIDE, },
{ "intf-show", ACTIONID_INTF_SHOW, },
{ "intf-show", ACTIONID_INTF_TOGGLE_FSC, },
{ "jump+extrashort", ACTIONID_JUMP_FORWARD_EXTRASHORT, },
{ "jump+long", ACTIONID_JUMP_FORWARD_LONG, },
{ "jump+medium", ACTIONID_JUMP_FORWARD_MEDIUM, },
......
......@@ -1483,6 +1483,7 @@ static const char *const ppsz_albumart_descriptions[] =
#define SCALE_DOWN_KEY_LONGTEXT N_("Decrease scale factor.")
#define DEINTERLACE_KEY_TEXT N_("Cycle deinterlace modes")
#define DEINTERLACE_KEY_LONGTEXT N_("Cycle through deinterlace modes.")
#define INTF_TOGGLE_FSC_KEY_TEXT N_("Show controller in fullscreen")
#define INTF_SHOW_KEY_TEXT N_("Show interface")
#define INTF_SHOW_KEY_LONGTEXT N_("Raise the interface above all other windows.")
#define INTF_HIDE_KEY_TEXT N_("Hide interface")
......@@ -2311,8 +2312,7 @@ vlc_module_begin ()
# define KEY_SCALE_UP "Alt+o"
# define KEY_SCALE_DOWN "Shift+Alt+o"
# define KEY_DEINTERLACE "d"
# define KEY_INTF_SHOW "i"
# define KEY_INTF_HIDE "Shift+i"
# define KEY_INTF_TOGGLE_FSC "i"
# define KEY_INTF_BOSS NULL
# define KEY_DISC_MENU "Ctrl+m"
# define KEY_TITLE_PREV "Ctrl+p"
......@@ -2429,8 +2429,7 @@ vlc_module_begin ()
# define KEY_SCALE_UP "Alt+o"
# define KEY_SCALE_DOWN "Alt+Shift+o"
# define KEY_DEINTERLACE "d"
# define KEY_INTF_SHOW "i"
# define KEY_INTF_HIDE "Shift+i"
# define KEY_INTF_TOGGLE_FSC "i"
# define KEY_INTF_BOSS NULL
# define KEY_DISC_MENU "Shift+m"
# define KEY_TITLE_PREV "Shift+o"
......@@ -2600,10 +2599,10 @@ vlc_module_begin ()
SCALE_DOWN_KEY_TEXT, SCALE_DOWN_KEY_LONGTEXT, false )
add_key( "key-deinterlace", KEY_DEINTERLACE,
DEINTERLACE_KEY_TEXT, DEINTERLACE_KEY_LONGTEXT, false )
add_key( "key-intf-show", KEY_INTF_SHOW,
INTF_SHOW_KEY_TEXT, INTF_SHOW_KEY_LONGTEXT, true )
add_key( "key-intf-hide", KEY_INTF_HIDE,
INTF_HIDE_KEY_TEXT, INTF_HIDE_KEY_LONGTEXT, true )
add_key( "key-intf-show", KEY_INTF_TOGGLE_FSC,
INTF_TOGGLE_FSC_KEY_TEXT, INTF_TOGGLE_FSC_KEY_TEXT, false )
add_obsolete_inner( "key-intf-hide", CONFIG_ITEM_KEY )
add_key( "key-intf-boss", KEY_INTF_BOSS,
INTF_BOSS_KEY_TEXT, INTF_BOSS_KEY_LONGTEXT, true )
add_key( "key-snapshot", KEY_SNAPSHOT,
......
......@@ -530,8 +530,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
priv->actions = vlc_InitActions( p_libvlc );
/* Create a variable for showing the fullscreen interface */
var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
var_SetBool( p_libvlc, "intf-show", true );
var_Create( p_libvlc, "intf-toggle-fscontrol", VLC_VAR_BOOL );
var_SetBool( p_libvlc, "intf-toggle-fscontrol", true );
/* Create a variable for the Boss Key */
var_Create( p_libvlc, "intf-boss", VLC_VAR_VOID );
......
......@@ -71,7 +71,7 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
return;
}
case MOUSE_BUTTON_CENTER:
var_ToggleBool(vout->p_libvlc, "intf-show");
var_ToggleBool(vout->p_libvlc, "intf-toggle-fscontrol");
return;
case MOUSE_BUTTON_RIGHT:
var_SetBool(vout->p_libvlc, "intf-popupmenu", true);
......
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