X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abcb9c6e58c93bee05d1f073b22f83cf8f3c21df..538f284a44001ff8285eaafebcc384bf638b5d66:/samples/webview/webview.cpp diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 17dca1d8c5..04e1db4e9a 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -22,6 +22,10 @@ #include "wx/wx.h" #endif +#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_IE +#error "A wxWebView backend is required by this sample" +#endif + #include "wx/artprov.h" #include "wx/notifmsg.h" #include "wx/settings.h" @@ -63,6 +67,7 @@ class WebFrame : public wxFrame { public: WebFrame(); + ~WebFrame(); void OnAnimationTimer(wxTimerEvent& evt); void UpdateState(); @@ -353,6 +358,12 @@ WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample") wxCommandEventHandler(WebFrame::OnLoadScheme), NULL, this ); } +WebFrame::~WebFrame() +{ + delete m_timer; + delete m_tools_menu; +} + void WebFrame::OnAnimationTimer(wxTimerEvent& WXUNUSED(evt)) { m_animation_angle += 15; @@ -586,8 +597,8 @@ void WebFrame::OnNewWindow(wxWebViewEvent& evt) void WebFrame::OnTitleChanged(wxWebViewEvent& evt) { + SetTitle(evt.GetString()); wxLogMessage("%s", "Title changed; title='" + evt.GetString() + "'"); - UpdateState(); } /**