]> git.sesse.net Git - vlc/commitdiff
When applicable, mention that modules weren't displayed because they only had advance...
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 1 Sep 2008 23:10:27 +0000 (01:10 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 1 Sep 2008 23:11:09 +0000 (01:11 +0200)
src/libvlc.c

index 960b7f4393f0d89ba2ea04143fbe9d4ebe798c30..fd8f1d6b02e9553100d022e435b1baa3fc222cf3 100644 (file)
@@ -1396,6 +1396,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
     bool b_color       = config_GetInt( p_this, "color" ) > 0;
     bool b_has_advanced = false;
     bool b_found       = false;
+    int  i_only_advanced = 0; /* Number of modules ignored because they
+                               * only have advanced options */
 
     memset( psz_spaces_text, ' ', PADDING_SPACES+LINE_START );
     psz_spaces_text[PADDING_SPACES+LINE_START] = '\0';
@@ -1472,7 +1474,10 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
             }
 
             if( p_item == p_end )
+            {
+                i_only_advanced++;
                 continue;
+            }
         }
 
         b_found = true;
@@ -1791,7 +1796,20 @@ static void Usage( libvlc_int_t *p_this, char const *psz_module_name )
            _( "add --advanced to your command line to see advanced options."));
     }
 
-    if( !b_found )
+    if( i_only_advanced > 0 )
+    {
+        if( b_color )
+        {
+            utf8_fprintf( stdout, "\n" WHITE "%s" GRAY " ", _( "Note:" ) );
+            utf8_fprintf( stdout, _( "%d module(s) were not displayed because they only have advanced options.\n" ), i_only_advanced );
+        }
+        else
+        {
+            utf8_fprintf( stdout, "\n%s ", _( "Note:" ) );
+            utf8_fprintf( stdout, _( "%d module(s) were not displayed because they only have advanced options.\n" ), i_only_advanced );
+        }
+    }
+    else if( !b_found )
     {
         if( b_color )
             utf8_fprintf( stdout, "\n" WHITE "%s" GRAY "\n",