]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename GetHref to GetURL in wxWebNavigationEvent, this brings it into line with the...
authorSteve Lamerton <steve.lamerton@gmail.com>
Mon, 25 Jul 2011 14:30:07 +0000 (14:30 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Mon, 25 Jul 2011 14:30:07 +0000 (14:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/webview.h
interface/wx/webview.h
samples/web/web.cpp

index 2a114f96c593c0ede412925d71bc008922409724..ed94c826114f8955506d06960ae6e0cb53879996 100644 (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;
index cae898bf7495645d24a8b30593050da900808a5e..7d5f96da905beb7ee89f716f5556eacd666c0142 100644 (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;
 
     /** 
index c46c65c6701f54780c45d75060a07676e0ccd385..a6b41d627a9e0e39babc06cbbc109c1d2acafa25 100644 (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();