]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
better implementation from VZ
[wxWidgets.git] / src / os2 / app.cpp
index 050117d47f74a6f4be427a8bd6b71075be603736..49d5217b64404f94a9e542bd753e53337c524ea7 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#include "wx/app.h"
+
 #ifndef WX_PRECOMP
     #include "wx/dynarray.h"
     #include "wx/frame.h"
 #ifndef WX_PRECOMP
     #include "wx/dynarray.h"
     #include "wx/frame.h"
-    #include "wx/app.h"
     #include "wx/utils.h"
     #include "wx/gdicmn.h"
     #include "wx/pen.h"
     #include "wx/utils.h"
     #include "wx/gdicmn.h"
     #include "wx/pen.h"
     #include "wx/dialog.h"
     #include "wx/msgdlg.h"
     #include "wx/intl.h"
     #include "wx/dialog.h"
     #include "wx/msgdlg.h"
     #include "wx/intl.h"
-    #include "wx/wxchar.h"
-    #include "wx/icon.h"
-    #include "wx/stdpaths.h"
-    #include "wx/filename.h"
+    #include "wx/crt.h"
+    #include "wx/log.h"
+    #include "wx/module.h"
 #endif
 
 #endif
 
-#include "wx/log.h"
-#include "wx/module.h"
+#include "wx/stdpaths.h"
+#include "wx/filename.h"
 
 #include "wx/os2/private.h"
 
 
 #include "wx/os2/private.h"
 
@@ -81,8 +81,7 @@ extern "C" int _System bsdselect(int,
 // global variables
 // ---------------------------------------------------------------------------
 
 // global variables
 // ---------------------------------------------------------------------------
 
-extern wxChar*                      wxBuffer;
-extern wxList WXDLLEXPORT           wxPendingDelete;
+WXDLLEXPORT_DATA(wxChar*) wxBuffer;
 extern wxCursor*                    g_globalCursor;
 
 HAB                                 vHabmain = NULLHANDLE;
 extern wxCursor*                    g_globalCursor;
 
 HAB                                 vHabmain = NULLHANDLE;
@@ -448,8 +447,6 @@ bool wxApp::OnInitGui()
 
 wxApp::wxApp()
 {
 
 wxApp::wxApp()
 {
-    argc = 0;
-    argv = NULL;
     m_nPrintMode = wxPRINT_WINDOWS;
     m_hMq = 0;
     m_maxSocketHandles = 0;
     m_nPrintMode = wxPRINT_WINDOWS;
     m_hMq = 0;
     m_maxSocketHandles = 0;
@@ -459,23 +456,11 @@ wxApp::wxApp()
 
 wxApp::~wxApp()
 {
 
 wxApp::~wxApp()
 {
-    //
-    // Delete command-line args
-    //
-#if wxUSE_UNICODE
-    int                             i;
-
-    for (i = 0; i < argc; i++)
-    {
-        delete[] argv[i];
-    }
-    delete[] argv;
-#endif
 } // end of wxApp::~wxApp
 
 bool gbInOnIdle = false;
 
 } // end of wxApp::~wxApp
 
 bool gbInOnIdle = false;
 
-void wxApp::OnIdle( wxIdleEvent& rEvent )
+void wxApp::OnIdle( wxIdleEvent& WXUNUSED(rEvent) )
 {
     //
     // Avoid recursion (via ProcessEvent default case)
 {
     //
     // Avoid recursion (via ProcessEvent default case)
@@ -485,8 +470,6 @@ void wxApp::OnIdle( wxIdleEvent& rEvent )
 
     gbInOnIdle = true;
 
 
     gbInOnIdle = true;
 
-    wxAppBase::OnIdle(rEvent);
-
 #if wxUSE_DC_CACHEING
     // automated DC cache management: clear the cached DCs and bitmap
     // if it's likely that the app has finished with them, that is, we
 #if wxUSE_DC_CACHEING
     // automated DC cache management: clear the cached DCs and bitmap
     // if it's likely that the app has finished with them, that is, we