From 1719a200c72cf16a09fddc581940da359033e6d3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 9 Jul 2011 23:36:38 +0000 Subject: [PATCH] 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 --- samples/console/console.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.50.0