From f7a3c9be64b63bb0d2186825741a64a6b791567b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Apr 2007 21:17:49 +0000 Subject: [PATCH] update wxApp::argc/argv to remove the options parsed by GTK+ itself from them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 56b33401b8..31f446d8b6 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -34,6 +34,7 @@ #include "wx/gtk/win_gtk.h" #include "wx/gtk/private.h" +#include "wx/apptrait.h" #include @@ -451,8 +452,13 @@ bool wxApp::Initialize(int& argc, wxChar **argv) init_result = gtk_init_check( &argc, &argv ); #endif // wxUSE_UNICODE/!wxUSE_UNICODE - if (!init_result) { - wxLogError(wxT("Unable to initialize gtk, is DISPLAY set properly?")); + // update internal arg[cv] as GTK+ may have removed processed options: + this->argc = argc; + this->argv = argv; + + if ( !init_result ) + { + wxLogError(_("Unable to initialize GTK+, is DISPLAY set properly?")); return false; }