X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ecf7346462b78a53defa2684aaac83dbfa29521..6ba718d7aee2f519d9146b90424ccec9e2243479:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index c987ef6334..b785132058 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 17/09/98 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,11 +11,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#ifdef __VMS -#define XtParent XTPARENT -#define XtDisplay XTDISPLAY -#endif - #include "wx/app.h" #ifndef WX_PRECOMP @@ -73,7 +67,6 @@ wxHashTable *wxWidgetHashTable = NULL; IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) -#ifdef __WXDEBUG__ extern "C" { typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *); @@ -91,7 +84,6 @@ static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent) } } -#endif // __WXDEBUG__ bool wxApp::Initialize(int& argc_, wxChar **argv_) { @@ -131,7 +123,7 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_) strcmp(loc, "POSIX") == 0 ) { // we're using C locale, "fix" it - wxLogDebug(_T("HP-UX fontset hack: forcing locale to en_US.iso88591")); + wxLogDebug(wxT("HP-UX fontset hack: forcing locale to en_US.iso88591")); putenv(fixAll ? "LC_ALL=en_US.iso88591" : "LC_CTYPE=en_US.iso88591"); } #endif // __HPUX__ @@ -169,10 +161,10 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_) // immediate crash inside XOpenIM() (if XIM is used) under IRIX wxString appname = wxTheApp->GetAppName(); if ( appname.empty() ) - appname = _T("wxapp"); + appname = wxT("wxapp"); wxString clsname = wxTheApp->GetClassName(); if ( clsname.empty() ) - clsname = _T("wx"); + clsname = wxT("wx"); // FIXME-UTF8: This code is taken from wxGTK and duplicated here. This // is just a temporary fix to make wxX11 compile in Unicode @@ -256,10 +248,8 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_) } m_initialDisplay = (WXDisplay*) dpy; -#ifdef __WXDEBUG__ // install the X error handler gs_pfnXErrorHandler = XSetErrorHandler(wxXErrorHandler); -#endif // __WXDEBUG__ // Add general resize proc XtActionsRec rec; @@ -278,8 +268,7 @@ void wxApp::CleanUp() { wxAppBase::CleanUp(); - delete wxWidgetHashTable; - wxWidgetHashTable = NULL; + wxDELETE(wxWidgetHashTable); delete m_mainLoop; @@ -473,31 +462,6 @@ void wxApp::SetTopLevelRealizedWidget(WXDisplay* display, WXWidget widget) .m_topLevelRealizedWidget = (Widget)widget; } -// Yield to other processes - -bool wxApp::Yield(bool onlyIfNeeded) -{ - static bool s_inYield = false; - - if ( s_inYield ) - { - if ( !onlyIfNeeded ) - { - wxFAIL_MSG( wxT("wxYield called recursively" ) ); - } - - return false; - } - - s_inYield = true; - - while (wxTheApp && wxTheApp->Pending()) - wxTheApp->Dispatch(); - - s_inYield = false; - - return true; -} // ---------------------------------------------------------------------------- // accessors for C modules