From 1f2f732921b6456c87ab8d180c5bd14456a5b35f Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Sun, 22 Feb 2009 14:42:35 +0000 Subject: [PATCH] remove wxAppConsoleBase::OInitGui and leave it only in wxApp[Base] class git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/app.h | 3 --- interface/wx/app.h | 7 +++---- src/common/appcmn.cpp | 4 ++++ src/common/init.cpp | 10 ---------- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/include/wx/app.h b/include/wx/app.h index 8a6a135df9..2aa047d3a9 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -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(); diff --git a/interface/wx/app.h b/interface/wx/app.h index 3e6fa3a054..9037103381 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -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); diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 9a6cb43f66..82fdabf78e 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -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; } diff --git a/src/common/init.cpp b/src/common/init.cpp index 0e76cc4aba..7af0af2157 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -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() ) { -- 2.45.2