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
This commit is contained in:
parent
d3a0a0eeab
commit
f7a3c9be64
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
#include "wx/gtk/private.h"
|
#include "wx/gtk/private.h"
|
||||||
|
#include "wx/apptrait.h"
|
||||||
|
|
||||||
#include <gdk/gdkx.h>
|
#include <gdk/gdkx.h>
|
||||||
|
|
||||||
@ -451,8 +452,13 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
init_result = gtk_init_check( &argc, &argv );
|
init_result = gtk_init_check( &argc, &argv );
|
||||||
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
#endif // wxUSE_UNICODE/!wxUSE_UNICODE
|
||||||
|
|
||||||
if (!init_result) {
|
// update internal arg[cv] as GTK+ may have removed processed options:
|
||||||
wxLogError(wxT("Unable to initialize gtk, is DISPLAY set properly?"));
|
this->argc = argc;
|
||||||
|
this->argv = argv;
|
||||||
|
|
||||||
|
if ( !init_result )
|
||||||
|
{
|
||||||
|
wxLogError(_("Unable to initialize GTK+, is DISPLAY set properly?"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user