]> git.sesse.net Git - vlc/commitdiff
Add global options for netsync and showintf and hide them from interface (Closes...
authorClément Stenac <zorglub@videolan.org>
Mon, 23 Jan 2006 19:09:22 +0000 (19:09 +0000)
committerClément Stenac <zorglub@videolan.org>
Mon, 23 Jan 2006 19:09:22 +0000 (19:09 +0000)
modules/control/netsync.c
modules/control/showintf.c
src/libvlc.c
src/libvlc.h

index f889ce473badbeab493d7782e40037085d8d6100..cd55db01b6bb038284e21413b1ed311008716a34 100644 (file)
@@ -65,10 +65,10 @@ static mtime_t GetClockRef( intf_thread_t *, mtime_t );
   "the master client used for the network synchronisation." )
 
 vlc_module_begin();
-    set_shortname( _("Netsync"));
+    set_shortname( _("Network Sync"));
     set_description( _("Network synchronisation") );
-    set_category( CAT_INTERFACE );
-    set_subcategory( SUBCAT_INTERFACE_CONTROL );
+    set_category( CAT_ADVANCED );
+    set_subcategory( SUBCAT_ADVANCED_MISC );
 
     add_bool( "netsync-master", 0, NULL,
               NETSYNC_TEXT, NETSYNC_LONGTEXT, VLC_TRUE );
@@ -96,8 +96,6 @@ static int Activate( vlc_object_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 ) );
     if( !p_intf->p_sys )
     {
index fafefa2eb3a4c7e4b795cd0bf80aaf4d8553dcdf..bce406778fa8071dbc238c3f53080d6704e46759 100644 (file)
@@ -64,10 +64,8 @@ static int  MouseEvent( vlc_object_t *, char const *,
 
 vlc_module_begin();
     set_shortname( "Showintf" );
-    set_category( CAT_INTERFACE );
-    set_subcategory( SUBCAT_INTERFACE_CONTROL );
     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_callbacks( E_(Open), E_(Close) );
index 8a7d2946e36f1e5008e85f88af0b1f3431a96412..06ea4a25fa230c44055a8a4c3c72200458162fd1 100644 (file)
@@ -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 );
     }
 
+    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
      */
index b580ee3fe8b4a7ccd43029047efba044782d45fb..d7b6e56ebc48153b03bc9f82ad890b43b7873a83 100644 (file)
@@ -100,6 +100,11 @@ static char *ppsz_snap_formats[] =
     "show all the available options, including those that most users should " \
     "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_( \
     "These options allow you to modify the behavior of the audio " \
     "subsystem, and to add audio filters which can be used for " \
@@ -345,6 +350,11 @@ static char *ppsz_align_descriptions[] =
     "Allows you to enable/disable the input clock synchronisation for " \
     "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 char *ppsz_clock_descriptions[] =
 { N_("Default"), N_("Disable"), N_("Enable") };
@@ -1256,6 +1266,9 @@ vlc_module_begin();
                  CLOCK_SYNCHRO_LONGTEXT, VLC_TRUE );
         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 */
     add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , VLC_TRUE );
     add_string( "codec", NULL, NULL, CODEC_TEXT,
@@ -1414,12 +1427,11 @@ vlc_module_begin();
     set_category( CAT_INTERFACE );
     set_subcategory( SUBCAT_INTERFACE_GENERAL );
     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,
                 INTF_LONGTEXT, VLC_FALSE );
         change_short('I');
 
-    set_section ( N_("Extra interface modules" ),  NULL );
     add_module_list_cat( "extraintf", SUBCAT_INTERFACE_GENERAL,
                          NULL, NULL, EXTRAINTF_TEXT,
                          EXTRAINTF_LONGTEXT, VLC_FALSE );
@@ -1437,6 +1449,9 @@ vlc_module_begin();
     add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
                     VLC_FALSE );
 
+    add_bool( "show-intf", VLC_FALSE, NULL, SHOWINTF_TEXT, SHOWINTF_LONGTEXT,
+              VLC_FALSE );
+
     set_subcategory( SUBCAT_INTERFACE_CONTROL );
     add_module_list_cat( "control", SUBCAT_INTERFACE_CONTROL, NULL, NULL,
                          CONTROL_TEXT, CONTROL_LONGTEXT, VLC_FALSE );