]> git.saurik.com Git - wxWidgets.git/commitdiff
Add EnableHistory support to the OSX WebKit backend.
authorSteve Lamerton <steve.lamerton@gmail.com>
Tue, 2 Aug 2011 09:21:47 +0000 (09:21 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Tue, 2 Aug 2011 09:21:47 +0000 (09:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/webview_webkit.h
src/osx/webview_webkit.mm

index 862121e2a365e793d3f703832e7b61b45750a35c..ae985910a4a24f95aca47d491eb135793989ab6a 100644 (file)
@@ -84,7 +84,7 @@ public:
     
     //History functions
     virtual void ClearHistory() {}
-    virtual void EnableHistory(bool WXUNUSED(enable) = true) {}
+    virtual void EnableHistory(bool enable = true);
     virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetBackwardHistory()
             { return wxVector<wxSharedPtr<wxWebHistoryItem> >(); }
     virtual wxVector<wxSharedPtr<wxWebHistoryItem> > GetForwardHistory() 
index 9323cc563aa9ef9730a3351e3886f6c3bf53c375..52d7e7de47c9cff7888dda61ae5614d2c5424c9d 100644 (file)
@@ -940,6 +940,14 @@ void wxWebViewWebKit::DeleteSelection()
     [(WebView*)m_webView deleteSelection];
 }
 
+void wxWebViewWebKit::EnableHistory(bool enable)
+{
+    if ( !m_webView )
+        return;
+        
+    [m_webView setMaintainsBackForwardList:enable];
+}
+
 //------------------------------------------------------------
 // Listener interfaces
 //------------------------------------------------------------