Rename GetHref to GetURL in wxWebNavigationEvent, this brings it into line with the other functions in wxWebView.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton 2011-07-25 14:30:07 +00:00
parent b236f090ed
commit e40741b95c
3 changed files with 17 additions and 16 deletions

View File

@ -339,11 +339,11 @@ class WXDLLIMPEXP_WEB wxWebNavigationEvent : public wxCommandEvent
{
public:
wxWebNavigationEvent() {}
wxWebNavigationEvent(wxEventType type, int id, const wxString href,
wxWebNavigationEvent(wxEventType type, int id, const wxString url,
const wxString target, bool canVeto)
: wxCommandEvent(type, id)
{
m_href = href;
m_url = url;
m_target = target;
m_vetoed = false;
m_canVeto = canVeto;
@ -352,7 +352,7 @@ public:
/**
* Get the URL being visited
*/
const wxString& GetHref() const { return m_href; }
const wxString& GetURL() const { return m_url; }
/**
* Get the target (frame or window) in which the URL that caused this event
@ -379,7 +379,7 @@ public:
void Veto() { wxASSERT(m_canVeto); m_vetoed = true; }
private:
wxString m_href;
wxString m_url;
wxString m_target;
bool m_canVeto;
bool m_vetoed;

View File

@ -534,10 +534,6 @@ public:
wxWebNavigationEvent();
wxWebNavigationEvent(wxEventType type, int id, const wxString href,
const wxString target, bool canVeto);
/**
Get the URL being visited
*/
const wxString& GetHref() const;
/**
Get the name of the target frame which the url of this event
@ -546,6 +542,11 @@ public:
*/
const wxString& GetTarget() const;
/**
Get the URL being visited
*/
const wxString& GetURL() const;
virtual wxEvent* Clone() const;
/**

View File

@ -453,7 +453,7 @@ void WebFrame::OnMode(wxCommandEvent& evt)
*/
void WebFrame::OnNavigationRequest(wxWebNavigationEvent& evt)
{
wxLogMessage("%s", "Navigation request to '" + evt.GetHref() + "' (target='" +
wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "' (target='" +
evt.GetTarget() + "')");
wxASSERT(m_browser->IsBusy());
@ -471,7 +471,7 @@ void WebFrame::OnNavigationRequest(wxWebNavigationEvent& evt)
*/
void WebFrame::OnNavigationComplete(wxWebNavigationEvent& evt)
{
wxLogMessage("%s", "Navigation complete; url='" + evt.GetHref() + "'");
wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
UpdateState();
}
@ -481,8 +481,8 @@ void WebFrame::OnNavigationComplete(wxWebNavigationEvent& evt)
void WebFrame::OnDocumentLoaded(wxWebNavigationEvent& evt)
{
//Only notify if the document is the main frame, not a subframe
if(evt.GetHref() == m_browser->GetCurrentURL())
wxLogMessage("%s", "Document loaded; url='" + evt.GetHref() + "'");
if(evt.GetURL() == m_browser->GetCurrentURL())
wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'");
UpdateState();
}
@ -491,12 +491,12 @@ void WebFrame::OnDocumentLoaded(wxWebNavigationEvent& evt)
*/
void WebFrame::OnNewWindow(wxWebNavigationEvent& evt)
{
wxLogMessage("%s", "New window; url='" + evt.GetHref() + "'");
wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'");
//If we handle new window events then just load them in this window as we
//are a single window browser
if(m_tools_handle_new_window->IsChecked())
m_browser->LoadUrl(evt.GetHref());
m_browser->LoadUrl(evt.GetURL());
//We always veto because we handle the event, otherwise under windows a new
//internet explorer windowis created
@ -639,10 +639,10 @@ void WebFrame::OnError(wxWebNavigationEvent& evt)
break;
}
wxLogMessage("Error; url='" + evt.GetHref() + "', error='" + errorCategory + "' (" + evt.GetString() + ")");
wxLogMessage("Error; url='" + evt.GetURL() + "', error='" + errorCategory + "' (" + evt.GetString() + ")");
//Show the info bar with an error
m_info->ShowMessage(_("An error occurred loading ") + evt.GetHref() + "\n" +
m_info->ShowMessage(_("An error occurred loading ") + evt.GetURL() + "\n" +
"'" + errorCategory + "' (" + evt.GetString() + ")", wxICON_ERROR);
UpdateState();