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
This commit is contained in:
Francesco Montorsi
2009-02-22 14:42:35 +00:00
parent 1fc5f38353
commit 1f2f732921
4 changed files with 7 additions and 17 deletions

View File

@@ -83,9 +83,6 @@ public:
// class OnInit() to do it. // class OnInit() to do it.
virtual bool OnInit(); 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 // This is the replacement for the normal main(): all program work should
// be done here. When OnRun() returns, the programs starts shutting down. // be done here. When OnRun() returns, the programs starts shutting down.
virtual int OnRun(); virtual int OnRun();

View File

@@ -533,7 +533,7 @@ public:
/** /**
Get display mode that is used use. This is only used in framebuffer 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; virtual wxVideoMode GetDisplayMode() const;
@@ -637,9 +637,8 @@ public:
virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event); virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
/** /**
Set display mode to use. This is only used in framebuffer wxWin Set display mode to use. This is only used in framebuffer wxWidgets
ports (such as wxMGL or wxDFB). This method should be called from ports (such as wxMGL or wxDFB).
wxApp::OnInitGui.
*/ */
virtual bool SetDisplayMode(const wxVideoMode& info); virtual bool SetDisplayMode(const wxVideoMode& info);

View File

@@ -103,6 +103,10 @@ bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig)
wxBitmap::InitStandardHandlers(); wxBitmap::InitStandardHandlers();
// for compatibility call the old initialization function too
if ( !OnInitGui() )
return false;
return true; return true;
} }

View File

@@ -298,9 +298,7 @@ bool wxEntryStart(int& argc, wxChar **argv)
// initialize wxRTTI // initialize wxRTTI
if ( !DoCommonPreInit() ) if ( !DoCommonPreInit() )
{
return false; return false;
}
// first of all, we need an application object // first of all, we need an application object
@@ -333,22 +331,15 @@ bool wxEntryStart(int& argc, wxChar **argv)
// -------------------------------------------- // --------------------------------------------
if ( !app->Initialize(argc, argv) ) if ( !app->Initialize(argc, argv) )
{
return false; return false;
}
// remember, possibly modified (e.g. due to removal of toolkit-specific // remember, possibly modified (e.g. due to removal of toolkit-specific
// parameters), command line arguments in member variables // parameters), command line arguments in member variables
app->argc = argc; app->argc = argc;
app->argv = argv; app->argv = argv;
wxCallAppCleanup callAppCleanup(app.get()); wxCallAppCleanup callAppCleanup(app.get());
// for compatibility call the old initialization function too
if ( !app->OnInitGui() )
return false;
// common initialization after wxTheApp creation // common initialization after wxTheApp creation
// --------------------------------------------- // ---------------------------------------------
@@ -484,7 +475,6 @@ int wxEntryReal(int& argc, wxChar **argv)
wxTRY wxTRY
{ {
// app initialization // app initialization
if ( !wxTheApp->CallOnInit() ) if ( !wxTheApp->CallOnInit() )
{ {