X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cf8b31be51b78617c06390e57390c2187784580..311da78ab09eae86859ab8c9f3297e536fda0604:/src/common/cmdline.cpp diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 4911befc4e..524ee1f43a 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -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();