call OnInit() from all samples to allow using standard command line options with all of them (patch 1623971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -85,6 +85,9 @@ IMPLEMENT_APP(MyApp)
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// we use a PNG image in our HTML page
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
|
||||
|
@@ -102,6 +102,9 @@
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB
|
||||
wxFileSystem::AddHandler(new wxZipFSHandler);
|
||||
|
@@ -53,6 +53,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#ifdef __WXMOTIF__
|
||||
delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used
|
||||
#endif
|
||||
|
@@ -125,6 +125,9 @@ IMPLEMENT_APP(MyApp)
|
||||
// 'Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// create the main application window
|
||||
MyFrame *frame = new MyFrame(_T("wxWebKit Sample"));
|
||||
|
||||
|
@@ -128,6 +128,9 @@ IMPLEMENT_APP(MyApp)
|
||||
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
#endif
|
||||
|
@@ -154,6 +154,9 @@ IMPLEMENT_APP(MyApp)
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_SYSTEM_OPTIONS
|
||||
wxSystemOptions::SetOption(wxT("no-maskblt"), 1);
|
||||
#endif
|
||||
|
@@ -155,6 +155,9 @@ wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main application window
|
||||
MyFrame *frame = new MyFrame(_("wxHtmlWindow testing application"),
|
||||
wxDefaultPosition, wxSize(640, 480));
|
||||
|
@@ -156,6 +156,9 @@ IMPLEMENT_APP(MyApp)
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
// Create the main application window
|
||||
MyFrame *frame = new MyFrame( _("wxHtmlWindow testing application"),
|
||||
wxDefaultPosition, wxSize(640, 480) );
|
||||
|
@@ -97,6 +97,9 @@ IMPLEMENT_APP(MyApp)
|
||||
// `Main program' equivalent: the program execution "starts" here
|
||||
bool MyApp::OnInit()
|
||||
{
|
||||
if ( !wxApp::OnInit() )
|
||||
return false;
|
||||
|
||||
#if wxUSE_LIBPNG
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user