]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/app.cpp
create the single global IO dispatcher in wxFDIODispatcher; don't use wxSelectDispatc...
[wxWidgets.git] / src / motif / app.cpp
index 6358c0387b4e64d130ae69c2f31c9cd953cd9ed5..c635bb4a19c90eb081c6b3802df54798cd1c13c6 100644 (file)
@@ -25,7 +25,7 @@
     #include "wx/log.h"
     #include "wx/utils.h"
     #include "wx/memory.h"
-    #include "wx/module.h"
+    #include "wx/font.h"
 #endif
 
 #include "wx/evtloop.h"
@@ -73,10 +73,6 @@ wxHashTable *wxWidgetHashTable = NULL;
 
 IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
 
-BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
-    EVT_IDLE(wxAppBase::OnIdle)
-END_EVENT_TABLE()
-
 #ifdef __WXDEBUG__
 extern "C"
 {
@@ -99,15 +95,15 @@ static int wxXErrorHandler(Display *dpy, XErrorEvent *xevent)
 
 bool wxApp::Initialize(int& argcOrig, wxChar **argvOrig)
 {
+#if wxUSE_INTL
+    wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
+#endif
+
     if ( !wxAppBase::Initialize(argcOrig, argvOrig) )
         return false;
 
     wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
 
-#if wxUSE_INTL
-    wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
-#endif
-
     return true;
 }
 
@@ -132,8 +128,6 @@ void wxApp::CleanUp()
 #endif
         delete it->second;
     }
-
-    delete m_perDisplayData;
 }
 
 void wxApp::Exit()
@@ -161,7 +155,7 @@ wxApp::wxApp()
 
 wxApp::~wxApp()
 {
-    wxApp::SetInstance(NULL);
+    delete m_perDisplayData;
 }
 
 int wxApp::MainLoop()
@@ -199,10 +193,17 @@ static char *fallbackResources[] = {
     wxMOTIF_STR("*sgiMode: True"),
     wxMOTIF_STR("*useSchemes: all"),
 #else // !__SGI__
-    wxMOTIF_STR("*menuBar.marginHeight: 0"),
-    wxMOTIF_STR("*menuBar.shadowThickness: 1"),
-    wxMOTIF_STR("*background: #c0c0c0"),
-    wxMOTIF_STR("*foreground: black"),
+#if !wxMOTIF_USE_RENDER_TABLE
+    wxMOTIF_STR("*.fontList: -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-*-*"),
+#else
+    wxMOTIF_STR("*wxDefaultRendition.fontName: -*-helvetica-medium-r-normal-*-*-120-*-*-*-*-*-*"),
+    wxMOTIF_STR("*wxDefaultRendition.fontType: FONT_IS_FONTSET"),
+    wxMOTIF_STR("*.renderTable: wxDefaultRendition"),
+#endif
+    wxMOTIF_STR("*listBox.background: white"),
+    wxMOTIF_STR("*text.background: white"),
+    wxMOTIF_STR("*comboBox.Text.background: white"),
+    wxMOTIF_STR("*comboBox.List.background: white"),
 #endif // __SGI__/!__SGI__
     NULL
 };