]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
Qt: add drow shadow effect
[vlc] / src / libvlc.c
index b77311d5fcb8c6b064526682d8ab8b3fc138be3f..34926aeeab231fc5149574435c8abaf97cf0c382 100644 (file)
@@ -427,12 +427,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 #if defined( ENABLE_NLS ) \
      && ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
 # if defined (WIN32) || defined (__APPLE__)
-    /* This ain't really nice to have to reload the config here but it seems
-     * the only way to do it. */
-
     if( !var_InheritBool( p_libvlc, "ignore-config" ) )
         config_LoadConfigFile( p_libvlc, "main" );
-    config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
     priv->i_verbose = var_InheritInteger( p_libvlc, "verbose" );
 
     /* Check if the user specified a custom language */
@@ -444,13 +440,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
 
         /* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */
         msg_Dbg( p_libvlc, "translation test: code is \"%s\"", _("C") );
-
-        module_EndBank( p_libvlc, false );
-        module_InitBank( p_libvlc );
-        if( !var_InheritBool( p_libvlc, "ignore-config" ) )
-            config_LoadConfigFile( p_libvlc, "main" );
-        config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
-        priv->i_verbose = var_InheritInteger( p_libvlc, "verbose" );
     }
     free( psz_language );
 # endif
@@ -484,8 +473,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /* Check for full help option */
     else if( var_InheritBool( p_libvlc, "full-help" ) )
     {
-        config_PutInt( p_libvlc, "advanced", 1);
-        config_PutInt( p_libvlc, "help-verbose", 1);
+        var_Create( p_libvlc, "advanced", VLC_VAR_BOOL );
+        var_SetBool( p_libvlc, "advanced", true );
+        var_Create( p_libvlc, "help-verbose", VLC_VAR_BOOL );
+        var_SetBool( p_libvlc, "help-verbose", true );
         Help( p_libvlc, "full-help" );
         b_exit = true;
         i_ret = VLC_EEXITSUCCESS;
@@ -517,7 +508,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
         if( var_InheritBool( p_libvlc, "reset-config" ) )
         {
             config_ResetAll( p_libvlc );
-            config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, true );
             config_SaveConfigFile( p_libvlc, NULL );
         }
     }
@@ -785,7 +775,8 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     p_capabilities[sizeof(p_capabilities) - 1] = '\0';
 #endif
 
-    msg_Dbg( p_libvlc, "CPU has capabilities %s", p_capabilities );
+    if (p_capabilities[0])
+        msg_Dbg( p_libvlc, "CPU has capabilities %s", p_capabilities );
 
     /*
      * Choose the best memcpy module
@@ -1394,14 +1385,14 @@ static void print_help_section( module_config_t *p_item, bool b_color, bool b_de
     if( b_color )
     {
         utf8_fprintf( stdout, RED"   %s:\n"GRAY, _( p_item->psz_text ) );
-        if( b_description && p_item->psz_longtext )
+        if( b_description && p_item->psz_longtext && *p_item->psz_longtext )
             utf8_fprintf( stdout, MAGENTA"   %s\n"GRAY,
                           _( p_item->psz_longtext ) );
     }
     else
     {
         utf8_fprintf( stdout, "   %s:\n", _( p_item->psz_text ) );
-        if( b_description && p_item->psz_longtext )
+        if( b_description && p_item->psz_longtext && *p_item->psz_longtext )
             utf8_fprintf( stdout, "   %s\n", _( p_item->psz_longtext ) );
     }
 }
@@ -1592,7 +1583,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
                         utf8_fprintf( stdout, "\n %s\n",
                                       _( p_item->psz_text ) );
                 }
-                if( b_description && p_item->psz_longtext )
+                if( b_description && p_item->psz_longtext
+                 && *p_item->psz_longtext )
                 {
                     if( b_color )
                         utf8_fprintf( stdout, CYAN " %s\n" GRAY,
@@ -1834,7 +1826,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
                 }
             }
 
-            if( b_description_hack && p_item->psz_longtext )
+            if( b_description_hack && p_item->psz_longtext
+             && *p_item->psz_longtext )
             {
                 sprintf( psz_buffer, "%s%s", _( p_item->psz_longtext ),
                          psz_suf );
@@ -1970,8 +1963,8 @@ static void Version( void )
 
     utf8_fprintf( stdout, _("VLC version %s (%s)\n"), VLC_Version(),
                   psz_vlc_changeset );
-    utf8_fprintf( stdout, _("Compiled by %s@%s.%s\n"),
-             VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() );
+    utf8_fprintf( stdout, _("Compiled by %s on %s (%s)\n"),
+             VLC_CompileBy(), VLC_CompileHost(), __DATE__" "__TIME__ );
     utf8_fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() );
     utf8_fprintf( stdout, "%s", LICENSE_MSG );