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
This commit is contained in:
@@ -61,8 +61,6 @@ public:
|
|||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
virtual wxString GetPageSource();
|
virtual wxString GetPageSource();
|
||||||
virtual wxString GetPageText() { return ""; }
|
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
|
//We do not want to hide the other overloads
|
||||||
using wxWebView::SetPage;
|
using wxWebView::SetPage;
|
||||||
|
@@ -814,7 +814,7 @@ wxString wxWebViewWebKit::GetCurrentURL()
|
|||||||
|
|
||||||
wxString wxWebViewWebKit::GetCurrentTitle()
|
wxString wxWebViewWebKit::GetCurrentTitle()
|
||||||
{
|
{
|
||||||
return GetPageTitle();
|
return wxStringWithNSString([m_webView mainFrameTitle]);
|
||||||
}
|
}
|
||||||
|
|
||||||
float wxWebViewWebKit::GetWebkitZoom()
|
float wxWebViewWebKit::GetWebkitZoom()
|
||||||
@@ -1208,10 +1208,6 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
|
|||||||
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title
|
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title
|
||||||
forFrame:(WebFrame *)frame
|
forFrame:(WebFrame *)frame
|
||||||
{
|
{
|
||||||
if (webKitWindow && frame == [sender mainFrame])
|
|
||||||
{
|
|
||||||
webKitWindow->SetPageTitle(wxStringWithNSString( title ));
|
|
||||||
}
|
|
||||||
wxString target = wxStringWithNSString([frame name]);
|
wxString target = wxStringWithNSString([frame name]);
|
||||||
wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
|
wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
|
||||||
wx_webviewctrls[sender]->GetId(),
|
wx_webviewctrls[sender]->GetId(),
|
||||||
|
Reference in New Issue
Block a user