Hello community, here is the log from the commit of package boinc-client for openSUSE:Factory checked in at 2017-09-14 21:15:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/boinc-client (Old) and /work/SRC/openSUSE:Factory/.boinc-client.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "boinc-client" Thu Sep 14 21:15:29 2017 rev:37 rq:525934 version:7.6.33 Changes: -------- --- /work/SRC/openSUSE:Factory/boinc-client/boinc-client.changes 2017-09-05 15:18:46.355276862 +0200 +++ /work/SRC/openSUSE:Factory/.boinc-client.new/boinc-client.changes 2017-09-14 21:16:11.154381403 +0200 @@ -1,0 +2,5 @@ +Fri Sep 8 09:38:10 UTC 2017 - [email protected] + +- Add 0001-MGR-support-wxWidgets-without-webview.patch + +------------------------------------------------------------------- New: ---- 0001-MGR-support-wxWidgets-without-webview.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ boinc-client.spec ++++++ --- /var/tmp/diff_new_pack.p0BnAS/_old 2017-09-14 21:16:12.742157923 +0200 +++ /var/tmp/diff_new_pack.p0BnAS/_new 2017-09-14 21:16:12.750156798 +0200 @@ -51,6 +51,7 @@ Patch2: boinc-docbook2x.patch Patch3: 0001-Fix-1530-null-pointer-dereference.patch Patch4: xlocale.patch +Patch5: 0001-MGR-support-wxWidgets-without-webview.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # BuildRequires: Mesa-devel @@ -161,7 +162,7 @@ %prep %setup -q -n %{name}_release-7.6-%{version} -D -a 1 -%patch -P 1 -P 2 -P 3 -P 4 -p1 +%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1 %build # Install user hints ++++++ 0001-MGR-support-wxWidgets-without-webview.patch ++++++ >From 84c17bc232a7721ab0687228af5b3acfba12ad75 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt <[email protected]> Date: Fri, 8 Sep 2017 01:55:57 +0200 Subject: [PATCH] MGR: support wxWidgets without webview If wxWidgets is built without support for the webview widget, make do with a wxHtmlWindow instead. --- clientgui/NoticeListCtrl.cpp | 25 +++++++++++++++++++++++++ clientgui/NoticeListCtrl.h | 8 ++++++++ 2 files changed, 33 insertions(+) Index: boinc-client_release-7.6-7.6.33/clientgui/NoticeListCtrl.cpp =================================================================== --- boinc-client_release-7.6-7.6.33.orig/clientgui/NoticeListCtrl.cpp +++ boinc-client_release-7.6-7.6.33/clientgui/NoticeListCtrl.cpp @@ -49,10 +49,14 @@ IMPLEMENT_DYNAMIC_CLASS( CNoticeListCtrl BEGIN_EVENT_TABLE( CNoticeListCtrl, wxWindow ) +#if wxUSE_WEBVIEW ////@begin CNoticeListCtrl event table entries EVT_WEBVIEW_NAVIGATING(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnLinkClicked) EVT_WEBVIEW_ERROR(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnWebViewError) ////@end CNoticeListCtrl event table entries +#else + EVT_HTML_LINK_CLICKED(ID_LIST_NOTIFICATIONSVIEW, CNoticeListCtrl::OnLinkClicked) +#endif END_EVENT_TABLE() @@ -84,7 +88,11 @@ bool CNoticeListCtrl::Create( wxWindow* wxWindow::Create( parent, ID_LIST_NOTIFICATIONSVIEW, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL ); +#if wxUSE_WEBVIEW m_browser = wxWebView::New( this, ID_LIST_NOTIFICATIONSVIEW ); +#else + m_browser = new wxHtmlWindow(this, ID_LIST_NOTIFICATIONSVIEW); +#endif ////@end CNoticeListCtrl creation wxBoxSizer *topsizer; @@ -236,7 +244,11 @@ void CNoticeListCtrl::SetItemCount(int n m_noticesBody += strBuffer; } m_noticesBody += wxT("</font></body></html>"); +#if wxUSE_WEBVIEW m_browser->SetPage(m_noticesBody, wxT("http://")); +#else + m_browser->SetPage(m_noticesBody); +#endif } @@ -246,6 +258,7 @@ void CNoticeListCtrl::Clear() { } +#if wxUSE_WEBVIEW void CNoticeListCtrl::OnLinkClicked( wxWebViewEvent& event ) { if (event.GetURL().StartsWith(wxT("http://")) || event.GetURL().StartsWith(wxT("https://"))) { event.Veto(); // Tell wxWebView not to follow link @@ -262,6 +275,18 @@ void CNoticeListCtrl::OnWebViewError( wx event.Skip(); } +#else +void CNoticeListCtrl::OnLinkClicked(wxHtmlLinkEvent &event) +{ + wxString url = event.GetLinkInfo().GetHref(); + if (!url.StartsWith(wxT("http://")) && !url.StartsWith(wxT("https://"))) { + event.Skip(); + return; + } + event.Skip(); // Tell element not to follow link + wxLaunchDefaultBrowser(url); +} +#endif /*! Index: boinc-client_release-7.6-7.6.33/clientgui/NoticeListCtrl.h =================================================================== --- boinc-client_release-7.6-7.6.33.orig/clientgui/NoticeListCtrl.h +++ boinc-client_release-7.6-7.6.33/clientgui/NoticeListCtrl.h @@ -45,8 +45,12 @@ public: ////@begin CNoticeListCtrl event handler declarations +#if defined(wxUSE_WEBVIEW) && wxUSE_WEBVIEW void OnLinkClicked( wxWebViewEvent& event ); void OnWebViewError( wxWebViewEvent& event ); +#else + void OnLinkClicked(wxHtmlLinkEvent &); +#endif ////@end CNoticeListCtrl event handler declarations @@ -56,7 +60,11 @@ public: bool m_bDisplayFetchingNotices; bool m_bDisplayEmptyNotice; private: +#if wxUSE_WEBVIEW wxWebView* m_browser; +#else + wxHtmlWindow *m_browser; +#endif bool m_bNeedsReloading; int m_itemCount; wxString m_noticesBody;
