#include "wx/gtk/private.h"
#include "wx/filesys.h"
#include "wx/base64.h"
+#include "wx/log.h"
#include <webkit/webkit.h>
// ----------------------------------------------------------------------------
GParamSpec*,
wxWebViewWebKit *webKitCtrl)
{
- // We can be called from webkit_web_view_dispose() during the window
- // destruction, don't use half-destroyed object in this case.
- if ( webKitCtrl->IsBeingDeleted() )
- return;
-
wxString url = webKitCtrl->GetCurrentURL();
WebKitLoadStatus status;
wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
+wxWebViewWebKit::wxWebViewWebKit()
+{
+ m_web_view = NULL;
+}
+
bool wxWebViewWebKit::Create(wxWindow *parent,
wxWindowID id,
const wxString &url,
wxWebViewWebKit::~wxWebViewWebKit()
{
- // The main goal here is to set m_isBeingDeleted to true to avoid the use
- // of this -- already half-destroyed -- object from WebKit callbacks, but
- // just setting it would prevent wxWindowDestroyEvent from being sent, so
- // send it now instead.
- SendDestroyEvent();
+ if (m_web_view)
+ GTKDisconnect(m_web_view);
}
bool wxWebViewWebKit::Enable( bool enable )
wxVisualAttributes
wxWebViewWebKit::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
{
- return GetDefaultAttributesFromGTKWidget(webkit_web_view_new);
+ return GetDefaultAttributesFromGTKWidget(webkit_web_view_new());
}