diff --git a/samples/preferences/preferences.cpp b/samples/preferences/preferences.cpp index c3b736ae4b..2ab9d35dd5 100644 --- a/samples/preferences/preferences.cpp +++ b/samples/preferences/preferences.cpp @@ -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.