Fix windows build error.

This commit is contained in:
Haojian Wu 2014-06-13 19:24:46 +08:00 committed by Tobias Taschner
parent 1c2885b290
commit 054e3f21a3
No known key found for this signature in database
GPG key ID: AE6ECD71294F87FD

View file

@ -66,13 +66,23 @@ bool wxWebViewChromium::Create(wxWindow* parent,
long style,
const wxString& name)
{
#ifdef __WXMSW__
if ( !wxControl::Create(parent, id, pos, size, style,
wxDefaultValidator, name) )
{
return false;
}
#endif
#ifdef __WXGTK__
style |= wxHSCROLL | wxVSCROLL;
if (!PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
if ( !PreCreation( parent, pos, size ) ||
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ) )
{
wxFAIL_MSG( wxT("wxWebViewChromium creation failed") );
return false;
}
#endif
m_historyLoadingFromList = false;
m_historyEnabled = true;
@ -95,6 +105,8 @@ bool wxWebViewChromium::Create(wxWindow* parent,
GTKCreateScrolledWindowWith(vbox);
g_object_ref(m_widget);
info.SetAsChild(vbox);
m_parent->DoAddChild( this );
PostCreation(size);
#endif
#if CHROME_VERSION_BUILD >= 1650
@ -106,8 +118,6 @@ bool wxWebViewChromium::Create(wxWindow* parent,
#endif
this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this);
m_parent->DoAddChild( this );
PostCreation(size);
return true;
}