X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ab82ca91e0e3680c4673c9947d9721c651eb192..9bb50fd0b04c824fc7ba14c0dc4ba4a2a9a1e6ad:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 3dbf47a9fd..ef00606e5f 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -79,20 +79,28 @@ BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) END_EVENT_TABLE() #ifdef __WXDEBUG__ +extern "C" +{ typedef int (*XErrorHandlerFunc)(Display *, XErrorEvent *); +} - XErrorHandlerFunc gs_pfnXErrorHandler = 0; +XErrorHandlerFunc gs_pfnXErrorHandler = 0; - static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent) - { - // just forward to the default handler for now - return gs_pfnXErrorHandler(dpy, xevent); - } +extern "C" +{ + +static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent) +{ + // just forward to the default handler for now + return gs_pfnXErrorHandler(dpy, xevent); +} + +} #endif // __WXDEBUG__ -bool wxApp::Initialize(int& argc, wxChar **argv) +bool wxApp::Initialize(int& argcOrig, wxChar **argvOrig) { - if ( !wxAppBase::Initialize(argc, argv) ) + if ( !wxAppBase::Initialize(argcOrig, argvOrig) ) return false; wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER); @@ -185,13 +193,13 @@ static char *fallbackResources[] = { // TODO: do something similar for the other systems, the hardcoded defaults // below are ugly #ifdef __SGI__ - "*sgiMode: True", - "*useSchemes: all", + wxMOTIF_STR("*sgiMode: True"), + wxMOTIF_STR("*useSchemes: all"), #else // !__SGI__ - "*menuBar.marginHeight: 0", - "*menuBar.shadowThickness: 1", - "*background: #c0c0c0", - "*foreground: black", + wxMOTIF_STR("*menuBar.marginHeight: 0"), + wxMOTIF_STR("*menuBar.shadowThickness: 1"), + wxMOTIF_STR("*background: #c0c0c0"), + wxMOTIF_STR("*foreground: black"), #endif // __SGI__/!__SGI__ NULL }; @@ -233,7 +241,7 @@ bool wxApp::OnInitGui() // Add general resize proc XtActionsRec rec; - rec.string = "resize"; + rec.string = wxMOTIF_STR("resize"); rec.proc = (XtActionProc)wxWidgetResizeProc; XtAppAddActions((XtAppContext) wxTheApp->m_appContext, &rec, 1);