From 8f3b30d57a36c43f6f950f7d15c3619f9b8a12b9 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Sun, 26 Sep 2004 18:03:28 +0000 Subject: [PATCH] Fixes to remove compile warnings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/html/webkit.h | 4 ++-- src/html/htmlctrl/webkit/webkit.mm | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h index 87dd797f0f..55bf86fac9 100755 --- a/include/wx/html/webkit.h +++ b/include/wx/html/webkit.h @@ -67,7 +67,7 @@ public: bool CanGetPageSource(); wxString GetPageSource(); void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString); - + //we need to resize the webview when the control size changes void OnSize(wxSizeEvent &event); protected: @@ -79,7 +79,7 @@ private: wxWindowID m_windowID; wxString m_currentURL; wxString m_pageTitle; - void* m_webView; + objc_object* m_webView; //It should be WebView, but WebView is Cocoa only, so any class which included //this header would have to link to Cocoa, so for now use void* instead. }; diff --git a/src/html/htmlctrl/webkit/webkit.mm b/src/html/htmlctrl/webkit/webkit.mm index 1b6155d173..cb85a483a4 100755 --- a/src/html/htmlctrl/webkit/webkit.mm +++ b/src/html/htmlctrl/webkit/webkit.mm @@ -200,17 +200,17 @@ bool wxWebKitCtrl::CanGoForward(){ bool wxWebKitCtrl::GoBack(){ if ( !m_webView ) return false; - - [m_webView goBack]; - return true; + + bool result = [(WebView*)m_webView goBack]; + return result; } bool wxWebKitCtrl::GoForward(){ if ( !m_webView ) return false; - [m_webView goForward]; - return true; + bool result = [(WebView*)m_webView goForward]; + return result; } void wxWebKitCtrl::Reload(){ @@ -236,14 +236,13 @@ bool wxWebKitCtrl::CanGetPageSource(){ } wxString wxWebKitCtrl::GetPageSource(){ - if ( !m_webView ) - return wxT(""); if (CanGetPageSource()){ WebDataSource* dataSource = [[m_webView mainFrame] dataSource]; return wxStringWithNSString( [[dataSource representation] documentSource] ); } + return wxT(""); } void wxWebKitCtrl::SetPageSource(wxString& source, const wxString& baseUrl){ @@ -263,7 +262,7 @@ void wxWebKitCtrl::OnSize(wxSizeEvent &event){ wxWindow* parent = GetParent(); bool inNotebook = false; int x = 0; - int y = 18; + int y = 18; while(parent != NULL) { // keep adding the position until we hit the notebook -- 2.45.2