wxgtk_webview_webkit_navigation(WebKitWebView*,
WebKitWebFrame *frame,
WebKitNetworkRequest *request,
- WebKitWebNavigationAction*,
+ WebKitWebNavigationAction *,
WebKitWebPolicyDecision *policy_decision,
wxWebViewWebKit *webKitCtrl)
{
return TRUE;
}
+static void
+wxgtk_webview_webkit_title_changed(WebKitWebView *webView,
+ WebKitWebFrame *frame,
+ gchar *title,
+ wxWebViewWebKit *webKitCtrl)
+{
+ wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
+ webKitCtrl->GetId(),
+ webKitCtrl->GetCurrentURL(),
+ "",
+ true);
+ thisEvent.SetString(wxString(title, wxConvUTF8));
+
+ if (webKitCtrl && webKitCtrl->GetEventHandler())
+ webKitCtrl->GetEventHandler()->ProcessEvent(thisEvent);
+
+}
+
} // extern "C"
//-----------------------------------------------------------------------------
g_signal_connect_after(web_view, "new-window-policy-decision-requested",
G_CALLBACK(wxgtk_webview_webkit_new_window), this);
+ g_signal_connect_after(web_view, "title-changed",
+ G_CALLBACK(wxgtk_webview_webkit_title_changed), this);
+
m_parent->DoAddChild( this );
PostCreation(size);