]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/app.cpp
wx.IconBundle support
[wxWidgets.git] / src / mgl / app.cpp
index bc64f28457d574e5282038e7dcedd9dc81839280..1a614e3f81d87b2988f9bec4fcda0f7f5cd45f92 100644 (file)
     #include "wx/dialog.h"
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/dialog.h"
     #include "wx/log.h"
     #include "wx/intl.h"
+    #include "wx/module.h"
 #endif
 
 #include "wx/evtloop.h"
 #endif
 
 #include "wx/evtloop.h"
-#include "wx/module.h"
 #include "wx/fontutil.h"
 #include "wx/univ/theme.h"
 #include "wx/univ/renderer.h"
 #include "wx/univ/colschem.h"
 #include "wx/sysopt.h"
 #include "wx/mgl/private.h"
 #include "wx/fontutil.h"
 #include "wx/univ/theme.h"
 #include "wx/univ/renderer.h"
 #include "wx/univ/colschem.h"
 #include "wx/sysopt.h"
 #include "wx/mgl/private.h"
+#include "wx/private/fontmgr.h"
 
 //-----------------------------------------------------------------------------
 // wxApp::Exit()
 
 //-----------------------------------------------------------------------------
 // wxApp::Exit()
@@ -124,7 +125,7 @@ class wxRootWindow : public wxWindow
             SetMGLwindow_t(MGL_wmGetRootWindow(g_winMng));
             SetBackgroundColour(wxTHEME_COLOUR(DESKTOP));
         }
             SetMGLwindow_t(MGL_wmGetRootWindow(g_winMng));
             SetBackgroundColour(wxTHEME_COLOUR(DESKTOP));
         }
-        ~wxRootWindow()
+        virtual ~wxRootWindow()
         {
             // we don't want to delete MGL_WM's rootWnd
             m_wnd = NULL;
         {
             // we don't want to delete MGL_WM's rootWnd
             m_wnd = NULL;
@@ -283,14 +284,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
         return false;
     }
 
         return false;
     }
 
-    // must do it before calling wxAppBase::Initialize(), because fonts are
-    // needed by stock lists which are created there
-    wxTheFontsManager = new wxFontsManager;
-
     if ( !wxAppBase::Initialize(argc, argv) )
     {
     if ( !wxAppBase::Initialize(argc, argv) )
     {
-        delete wxTheFontsManager;
-        wxTheFontsManager = NULL;
         MGL_exit();
         return false;
     }
         MGL_exit();
         return false;
     }
@@ -313,8 +308,7 @@ struct wxMGLFinalCleanup: public wxModule
 
     void OnExit()
     {
 
     void OnExit()
     {
-        delete wxTheFontsManager;
-        wxTheFontsManager = (wxFontsManager*) NULL;
+        wxFontsManager::CleanUp();
 
         wxDestroyMGL_WM();
         MGL_exit();
 
         wxDestroyMGL_WM();
         MGL_exit();