X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db2d879ad4bdd492daee48bf2829760b92d8e50e..049426fc8013b222c71ce44ca491e7461499085f:/src/gtk/app.cpp diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index d953d8d0da..f4e7a220a2 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -28,13 +28,15 @@ #include "wx/module.h" #include "wx/image.h" +#if wxUSE_THREADS #include "wx/thread.h" +#endif #include "unistd.h" -#include -#include -#include +#include "glib.h" +#include "gdk/gdk.h" +#include "gtk/gtk.h" #include "wx/gtk/win_gtk.h" @@ -406,9 +408,11 @@ void wxApp::OnIdle( wxIdleEvent &event ) DeletePendingObjects(); /* flush the logged messages if any */ +#if wxUSE_LOG wxLog *log = wxLog::GetActiveTarget(); if (log != NULL && log->HasPendingMessages()) log->Flush(); +#endif // wxUSE_LOG /* Send OnIdle events to all windows */ bool needMore = SendIdleEvents(); @@ -571,9 +575,6 @@ bool wxApp::Initialize() wxImage::InitStandardHandlers(); - /* no global cursor under X - g_globalCursor = new wxCursor; */ - wxModule::RegisterModules(); if (!wxModule::InitializeModules()) return FALSE; @@ -635,6 +636,7 @@ void wxApp::CleanUp() } #endif // Debug +#if wxUSE_LOG // do this as the very last thing because everything else can log messages wxLog::DontCreateOnDemand(); @@ -647,6 +649,7 @@ wxLog *wxApp::CreateLogTarget() { return new wxLogGui; } +#endif // wxUSE_LOG //----------------------------------------------------------------------------- // wxEntry @@ -656,6 +659,8 @@ int wxEntry( int argc, char *argv[] ) { gtk_set_locale(); + if (!wxOKlibc()) wxConvCurrent = &wxConvLocal; + gtk_init( &argc, &argv ); wxSetDetectableAutoRepeat( TRUE ); @@ -730,6 +735,7 @@ int wxEntry( int argc, char *argv[] ) } } +#if wxUSE_LOG // flush the logged messages if any wxLog *log = wxLog::GetActiveTarget(); if (log != NULL && log->HasPendingMessages()) @@ -741,6 +747,7 @@ int wxEntry( int argc, char *argv[] ) wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr); if ( oldlog ) delete oldlog; +#endif // wxUSE_LOG wxApp::CleanUp();