Commit 1bccb7df authored by Clément Stenac's avatar Clément Stenac

Add global options for netsync and showintf and hide them from interface (Closes:#508)

parent 3814df3b
...@@ -65,10 +65,10 @@ static mtime_t GetClockRef( intf_thread_t *, mtime_t ); ...@@ -65,10 +65,10 @@ static mtime_t GetClockRef( intf_thread_t *, mtime_t );
"the master client used for the network synchronisation." ) "the master client used for the network synchronisation." )
vlc_module_begin(); vlc_module_begin();
set_shortname( _("Netsync")); set_shortname( _("Network Sync"));
set_description( _("Network synchronisation") ); set_description( _("Network synchronisation") );
set_category( CAT_INTERFACE ); set_category( CAT_ADVANCED );
set_subcategory( SUBCAT_INTERFACE_CONTROL ); set_subcategory( SUBCAT_ADVANCED_MISC );
add_bool( "netsync-master", 0, NULL, add_bool( "netsync-master", 0, NULL,
NETSYNC_TEXT, NETSYNC_LONGTEXT, VLC_TRUE ); NETSYNC_TEXT, NETSYNC_LONGTEXT, VLC_TRUE );
...@@ -96,8 +96,6 @@ static int Activate( vlc_object_t *p_this ) ...@@ -96,8 +96,6 @@ static int Activate( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t*)p_this; intf_thread_t *p_intf = (intf_thread_t*)p_this;
msg_Info( p_intf, "Using the netsync interface module..." );
p_intf->p_sys = malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( !p_intf->p_sys ) if( !p_intf->p_sys )
{ {
......
...@@ -64,10 +64,8 @@ static int MouseEvent( vlc_object_t *, char const *, ...@@ -64,10 +64,8 @@ static int MouseEvent( vlc_object_t *, char const *,
vlc_module_begin(); vlc_module_begin();
set_shortname( "Showintf" ); set_shortname( "Showintf" );
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_integer( "showintf-threshold", 10, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE ); add_integer( "showintf-threshold", 10, NULL, THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
set_description( _("Interface showing control interface") ); set_description( _("Show interface with mouse") );
set_capability( "interface", 0 ); set_capability( "interface", 0 );
set_callbacks( E_(Open), E_(Close) ); set_callbacks( E_(Open), E_(Close) );
......
...@@ -786,6 +786,16 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) ...@@ -786,6 +786,16 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
AddIntfInternal( 0, "logger", VLC_FALSE, VLC_FALSE, 1, &psz_logmode ); AddIntfInternal( 0, "logger", VLC_FALSE, VLC_FALSE, 1, &psz_logmode );
} }
if( config_GetInt( p_vlc, "show-intf" ) == 1 )
{
VLC_AddIntf( 0, "showintf", VLC_FALSE, VLC_FALSE );
}
if( config_GetInt( p_vlc, "network-synchronisation") == 1 )
{
VLC_AddIntf( 0, "netsync", VLC_FALSE, VLC_FALSE );
}
/* /*
* FIXME: kludge to use a p_vlc-local variable for the Mozilla plugin * FIXME: kludge to use a p_vlc-local variable for the Mozilla plugin
*/ */
......
...@@ -100,6 +100,11 @@ static char *ppsz_snap_formats[] = ...@@ -100,6 +100,11 @@ static char *ppsz_snap_formats[] =
"show all the available options, including those that most users should " \ "show all the available options, including those that most users should " \
"never touch.") "never touch.")
#define SHOWINTF_TEXT N_("Show interface with mouse")
#define SHOWINTF_LONGTEXT N_( \
"If this enabled, the interface will be shown when you move the mouse to "\
"the edge of the screen in fullscreen mode." )
#define AOUT_CAT_LONGTEXT N_( \ #define AOUT_CAT_LONGTEXT N_( \
"These options allow you to modify the behavior of the audio " \ "These options allow you to modify the behavior of the audio " \
"subsystem, and to add audio filters which can be used for " \ "subsystem, and to add audio filters which can be used for " \
...@@ -345,6 +350,11 @@ static char *ppsz_align_descriptions[] = ...@@ -345,6 +350,11 @@ static char *ppsz_align_descriptions[] =
"Allows you to enable/disable the input clock synchronisation for " \ "Allows you to enable/disable the input clock synchronisation for " \
"real-time sources.") "real-time sources.")
#define NETSYNC_TEXT N_("Network synchronisation" )
#define NETSYNC_LONGTEXT N_( "This allows you to remotely " \
"synchronise clocks for server and client. The detailed settings " \
"are available in Advanced / Others / Network Sync" )
static int pi_clock_values[] = { -1, 0, 1 }; static int pi_clock_values[] = { -1, 0, 1 };
static char *ppsz_clock_descriptions[] = static char *ppsz_clock_descriptions[] =
{ N_("Default"), N_("Disable"), N_("Enable") }; { N_("Default"), N_("Disable"), N_("Enable") };
...@@ -1256,6 +1266,9 @@ vlc_module_begin(); ...@@ -1256,6 +1266,9 @@ vlc_module_begin();
CLOCK_SYNCHRO_LONGTEXT, VLC_TRUE ); CLOCK_SYNCHRO_LONGTEXT, VLC_TRUE );
change_integer_list( pi_clock_values, ppsz_clock_descriptions, 0 ); change_integer_list( pi_clock_values, ppsz_clock_descriptions, 0 );
add_bool( "network-synchronisation", VLC_FALSE, NULL, NETSYNC_TEXT,
NETSYNC_LONGTEXT, VLC_TRUE );
/* Decoder options */ /* Decoder options */
add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , VLC_TRUE ); add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , VLC_TRUE );
add_string( "codec", NULL, NULL, CODEC_TEXT, add_string( "codec", NULL, NULL, CODEC_TEXT,
...@@ -1414,12 +1427,11 @@ vlc_module_begin(); ...@@ -1414,12 +1427,11 @@ vlc_module_begin();
set_category( CAT_INTERFACE ); set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_GENERAL ); set_subcategory( SUBCAT_INTERFACE_GENERAL );
add_category_hint( N_("Interface"), INTF_CAT_LONGTEXT , VLC_FALSE ); add_category_hint( N_("Interface"), INTF_CAT_LONGTEXT , VLC_FALSE );
set_section ( N_("Interface module" ), NULL ); set_section ( N_("Interfaces" ), NULL );
add_module_cat( "intf", SUBCAT_INTERFACE_GENERAL, NULL, NULL, INTF_TEXT, add_module_cat( "intf", SUBCAT_INTERFACE_GENERAL, NULL, NULL, INTF_TEXT,
INTF_LONGTEXT, VLC_FALSE ); INTF_LONGTEXT, VLC_FALSE );
change_short('I'); change_short('I');
set_section ( N_("Extra interface modules" ), NULL );
add_module_list_cat( "extraintf", SUBCAT_INTERFACE_GENERAL, add_module_list_cat( "extraintf", SUBCAT_INTERFACE_GENERAL,
NULL, NULL, EXTRAINTF_TEXT, NULL, NULL, EXTRAINTF_TEXT,
EXTRAINTF_LONGTEXT, VLC_FALSE ); EXTRAINTF_LONGTEXT, VLC_FALSE );
...@@ -1437,6 +1449,9 @@ vlc_module_begin(); ...@@ -1437,6 +1449,9 @@ vlc_module_begin();
add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT, add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
VLC_FALSE ); VLC_FALSE );
add_bool( "show-intf", VLC_FALSE, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
VLC_FALSE );
set_subcategory( SUBCAT_INTERFACE_CONTROL ); set_subcategory( SUBCAT_INTERFACE_CONTROL );
add_module_list_cat( "control", SUBCAT_INTERFACE_CONTROL, NULL, NULL, add_module_list_cat( "control", SUBCAT_INTERFACE_CONTROL, NULL, NULL,
CONTROL_TEXT, CONTROL_LONGTEXT, VLC_FALSE ); CONTROL_TEXT, CONTROL_LONGTEXT, VLC_FALSE );
......
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