From: Vadim Zeitlin Date: Sat, 9 Jul 2011 23:36:38 +0000 (+0000) Subject: Output something from the console sample even if it's ran without arguments. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1719a200c72cf16a09fddc581940da359033e6d3?ds=inline Output something from the console sample even if it's ran without arguments. Running console sample without parameters didn't do anything by default and didn't output anything neither which was presumably rather confusing. Do output a welcome message at least to indicate that something happened. Closes #13299. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 89647376ce..fa356714ad 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -103,6 +103,14 @@ int main(int argc, char **argv) break; } + if ( argc == 1 ) + { + // If there were no command-line options supplied, emit a message + // otherwise it's not obvious that the sample ran successfully + wxPrintf("Welcome to the wxWidgets 'console' sample!\n"); + wxPrintf("For more information, run it again with the --help option\n"); + } + // do something useful here return 0;