]> git.saurik.com Git - wxWidgets.git/commitdiff
update wxApp::argc/argv to remove the options parsed by GTK+ itself from them
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Apr 2007 21:17:49 +0000 (21:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Apr 2007 21:17:49 +0000 (21:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp

index 56b33401b890e2fe38f6df43c1780030d063d45a..31f446d8b69eb367e0d9e8f873b1ed21f5d72eff 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "wx/gtk/win_gtk.h"
 #include "wx/gtk/private.h"
+#include "wx/apptrait.h"
 
 #include <gdk/gdkx.h>
 
@@ -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;
     }