]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/app.cpp
added ellipsis to a couple of stock labels
[wxWidgets.git] / src / motif / app.cpp
index 1b899d82cad8f69a62bc8e1e198fe525274a152e..4fa8fbcc8fb0043433150e09d1149989e5c8a9ff 100644 (file)
 #endif
 
 #include "wx/app.h"
-#include "wx/utils.h"
-#include "wx/module.h"
-#include "wx/memory.h"
-#include "wx/log.h"
-#include "wx/intl.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/hash.h"
+    #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/utils.h"
+    #include "wx/memory.h"
+    #include "wx/font.h"
+#endif
+
 #include "wx/evtloop.h"
-#include "wx/hash.h"
 
 #if wxUSE_THREADS
     #include "wx/thread.h"
 #endif
 
 #ifdef __VMS__
-#pragma message disable nosimpint
+    #pragma message disable nosimpint
 #endif
 #include <Xm/Xm.h>
 #include <X11/Xlib.h>
@@ -39,7 +43,7 @@
 #include <X11/Xresource.h>
 #include <X11/Xatom.h>
 #ifdef __VMS__
-#pragma message enable nosimpint
+    #pragma message enable nosimpint
 #endif
 
 #include "wx/motif/private.h"
@@ -63,7 +67,6 @@ static void wxTLWidgetDestroyCallback(Widget w, XtPointer clientData,
                                       XtPointer ptr);
 static WXWidget wxCreateTopLevelWidget( WXDisplay* display );
 
-extern wxList wxPendingDelete;
 extern bool wxAddIdleCallback();
 
 wxHashTable *wxWidgetHashTable = NULL;
@@ -247,8 +250,20 @@ bool wxApp::OnInitGui()
     wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
     XtAppSetFallbackResources((XtAppContext) wxTheApp->m_appContext, fallbackResources);
 
-    Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,(String)NULL,NULL,
-        wxTheApp->GetClassName().c_str(), NULL, 0,
+    // we shouldn't pass empty application/class name as it results in
+    // immediate crash inside XOpenIM() (if XIM is used) under IRIX
+    wxString appname = wxTheApp->GetAppName();
+    if ( appname.empty() )
+        appname = _T("wxapp");
+    wxString clsname = wxTheApp->GetClassName();
+    if ( clsname.empty() )
+        clsname = _T("wx");
+
+    Display *dpy = XtOpenDisplay((XtAppContext) wxTheApp->m_appContext,
+        (String)NULL,
+        appname.c_str(),
+        clsname.c_str(),
+        NULL, 0,    // no options
 # if XtSpecificationRelease < 5
         (Cardinal*) &argc,
 # else
@@ -362,7 +377,7 @@ WXWidget wxCreateTopLevelRealizedWidget( WXDisplay* WXUNUSED(display) )
 {
     Widget rTlw = XtVaCreateWidget( "dummy_widget", topLevelShellWidgetClass,
                                     (Widget)wxTheApp->GetTopLevelWidget(),
-                                     NULL, 0 );
+                                     NULL );
     XtSetMappedWhenManaged( rTlw, False );
     XtRealizeWidget( rTlw );