From 1f0acb435592470b421b80df854fbbb08cd2853f Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Fri, 5 Aug 2011 18:23:08 +0000 Subject: [PATCH] Remove SetPageTitle and GetPageTitle and make GetCurrentTitle actually return the page title. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/webview_webkit.h | 2 -- src/osx/webview_webkit.mm | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h index a63428b048..34f34f104b 100644 --- a/include/wx/osx/webview_webkit.h +++ b/include/wx/osx/webview_webkit.h @@ -61,8 +61,6 @@ public: virtual void Stop(); virtual wxString GetPageSource(); virtual wxString GetPageText() { return ""; } - virtual void SetPageTitle(const wxString& title) { m_pageTitle = title; } - virtual wxString GetPageTitle(){ return m_pageTitle; } //We do not want to hide the other overloads using wxWebView::SetPage; diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm index c3a8e7458d..06a518f4d6 100644 --- a/src/osx/webview_webkit.mm +++ b/src/osx/webview_webkit.mm @@ -814,7 +814,7 @@ wxString wxWebViewWebKit::GetCurrentURL() wxString wxWebViewWebKit::GetCurrentTitle() { - return GetPageTitle(); + return wxStringWithNSString([m_webView mainFrameTitle]); } float wxWebViewWebKit::GetWebkitZoom() @@ -1208,10 +1208,6 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out) - (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title forFrame:(WebFrame *)frame { - if (webKitWindow && frame == [sender mainFrame]) - { - webKitWindow->SetPageTitle(wxStringWithNSString( title )); - } wxString target = wxStringWithNSString([frame name]); wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, wx_webviewctrls[sender]->GetId(), -- 2.45.2