]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdline.cpp
Removed rundant files, updated readme.txt.
[wxWidgets.git] / src / common / cmdline.cpp
index 4911befc4e1f210274766e091b3a524a3f3e4126..524ee1f43a1875b6964bee92fa2636da42eb1d92 100644 (file)
@@ -808,9 +808,17 @@ int wxCmdLineParser::Parse(bool showUsage)
                 }
                 else
                 {
-                    optName.Printf(_("%s (or %s)"),
-                                   opt.shortName.c_str(),
-                                   opt.longName.c_str());
+                    if ( AreLongOptionsEnabled() )
+                    {
+                        optName.Printf( _("%s (or %s)"),
+                                        opt.shortName.c_str(),
+                                        opt.longName.c_str() );
+                    }
+                    else
+                    {
+                        optName.Printf( wxT("%s"),
+                                        opt.shortName.c_str() );
+                    }
                 }
 
                 errorMsg << wxString::Format(_("The value for the option '%s' must be specified."),
@@ -842,7 +850,7 @@ int wxCmdLineParser::Parse(bool showUsage)
         }
     }
 
-    if ( !ok && errorMsg.length() != 0 )
+    if ( !ok && (errorMsg.length() != 0 || helpRequested) )
     {
         wxString usage;
         wxMessageOutput* msgOut = wxMessageOutput::Get();