]> git.saurik.com Git - wxWidgets.git/commitdiff
remove wxAppConsoleBase::OInitGui and leave it only in wxApp[Base] class
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 22 Feb 2009 14:42:35 +0000 (14:42 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 22 Feb 2009 14:42:35 +0000 (14:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/app.h
interface/wx/app.h
src/common/appcmn.cpp
src/common/init.cpp

index 8a6a135df983d94d3be021f20c48d1b15bd8f7fb..2aa047d3a9784874079df472dfebd15485fbac59 100644 (file)
@@ -83,9 +83,6 @@ public:
     // class OnInit() to do it.
     virtual bool OnInit();
 
-    // this is here only temporary hopefully (FIXME)
-    virtual bool OnInitGui() { return true; }
-
     // This is the replacement for the normal main(): all program work should
     // be done here. When OnRun() returns, the programs starts shutting down.
     virtual int OnRun();
index 3e6fa3a054c06b847c8a27c55f98a5503806ce72..9037103381b94379583649e9c39e7f22e2e5f34a 100644 (file)
@@ -533,7 +533,7 @@ public:
 
     /**
         Get display mode that is used use. This is only used in framebuffer
-        wxWin ports (such as wxMGL or wxDFB).
+        wxWidgets ports (such as wxMGL or wxDFB).
     */
     virtual wxVideoMode GetDisplayMode() const;
 
@@ -637,9 +637,8 @@ public:
     virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
 
     /**
-        Set display mode to use. This is only used in framebuffer wxWin
-        ports (such as wxMGL or wxDFB). This method should be called from
-        wxApp::OnInitGui.
+        Set display mode to use. This is only used in framebuffer wxWidgets
+        ports (such as wxMGL or wxDFB).
     */
     virtual bool SetDisplayMode(const wxVideoMode& info);
 
index 9a6cb43f66eb61b8d3a0241901fbeca9e3747263..82fdabf78e515d524b6d2dff811f70ae84574831 100644 (file)
@@ -103,6 +103,10 @@ bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig)
 
     wxBitmap::InitStandardHandlers();
 
+    // for compatibility call the old initialization function too
+    if ( !OnInitGui() )
+        return false;
+
     return true;
 }
 
index 0e76cc4aba51024f7794b66ee564dbfb94c48da7..7af0af21578f9bf895608ffc964fa7151b08f283 100644 (file)
@@ -298,9 +298,7 @@ bool wxEntryStart(int& argc, wxChar **argv)
 
     // initialize wxRTTI
     if ( !DoCommonPreInit() )
-    {
         return false;
-    }
 
 
     // first of all, we need an application object
@@ -333,22 +331,15 @@ bool wxEntryStart(int& argc, wxChar **argv)
     // --------------------------------------------
 
     if ( !app->Initialize(argc, argv) )
-    {
         return false;
-    }
 
     // remember, possibly modified (e.g. due to removal of toolkit-specific
     // parameters), command line arguments in member variables
     app->argc = argc;
     app->argv = argv;
 
-
     wxCallAppCleanup callAppCleanup(app.get());
 
-    // for compatibility call the old initialization function too
-    if ( !app->OnInitGui() )
-        return false;
-
 
     // common initialization after wxTheApp creation
     // ---------------------------------------------
@@ -484,7 +475,6 @@ int wxEntryReal(int& argc, wxChar **argv)
 
     wxTRY
     {
-
         // app initialization
         if ( !wxTheApp->CallOnInit() )
         {