X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb81f1a6f1d8454dd09edf46688ba55e5f2774d4..172df1f0351019adaada76e16847b3ca6c2421eb:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 4add04f7cf..a28cc95f91 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -97,15 +97,32 @@ bool wxApp::Initialize(int& argc, wxChar **argv) wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER); +#if wxUSE_INTL + wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding()); +#endif + return true; } void wxApp::CleanUp() { + wxAppBase::CleanUp(); + delete wxWidgetHashTable; wxWidgetHashTable = NULL; - wxAppBase::CleanUp(); + delete m_mainLoop; + + for( wxPerDisplayDataMap::iterator it = m_perDisplayData->begin(), + end = m_perDisplayData->end(); + it != end; ++it ) + { + delete it->second->m_visualInfo; + XtDestroyWidget( it->second->m_topLevelWidget ); + delete it->second; + } + + delete m_perDisplayData; } void wxApp::Exit() @@ -133,19 +150,6 @@ wxApp::wxApp() wxApp::~wxApp() { - delete m_mainLoop; - - for( wxPerDisplayDataMap::iterator it = m_perDisplayData->begin(), - end = m_perDisplayData->end(); - it != end; ++it ) - { - delete it->second->m_visualInfo; - XtDestroyWidget( it->second->m_topLevelWidget ); - delete it->second; - } - - delete m_perDisplayData; - wxApp::SetInstance(NULL); } @@ -189,6 +193,7 @@ bool wxApp::OnInitGui() if( !wxAppBase::OnInitGui() ) return false; + XtSetLanguageProc(NULL, NULL, NULL); XtToolkitInitialize() ; wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext(); XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);