From 33293a32fe18ff90ed0154092554b089ef84c71b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 20 Aug 2002 14:15:42 +0000 Subject: [PATCH] fixed error message when long options are disabled (patch 597771) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/cmdline.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index ec1d43bdb4..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."),