Suppress bogus GTK errors from wxNotebook in preferences sample

Call GTKAllowDiagnosticsControl() to let the code in wxNotebook
suppressing them have an effect.
This commit is contained in:
Vadim Zeitlin 2023-10-01 17:13:01 +02:00
parent 6a41d8a486
commit 95bd6d4cfa

View file

@ -282,6 +282,13 @@ bool MyApp::OnInit()
if ( !wxApp::OnInit() )
return false;
#ifdef __WXGTK__
// Many version of wxGTK generate spurious diagnostic messages when
// destroying wxNotebook (or removing pages from it), allow wxWidgets to
// suppress them.
GTKAllowDiagnosticsControl();
#endif // __WXGTK__
// This will be used in the title of the preferences dialog under some
// platforms, don't leave it as default "Preferences" because this would
// result in rather strange "Preferences Preferences" title.