]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove SetPageTitle and GetPageTitle and make GetCurrentTitle actually return the...
authorSteve Lamerton <steve.lamerton@gmail.com>
Fri, 5 Aug 2011 18:23:08 +0000 (18:23 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Fri, 5 Aug 2011 18:23:08 +0000 (18:23 +0000)
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
src/osx/webview_webkit.mm

index a63428b0485c4f158ed96f3d02231c8c649163fd..34f34f104ba7d731003c0bbbbd1db17091adfac3 100644 (file)
@@ -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;
index c3a8e7458d99be5aeaa0e5230953a04800b7fa3e..06a518f4d61164950e5ab9c756d27c281d36221c 100644 (file)
@@ -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(),