Add upstream patch, fix RH#1268615

epel8
Jeremy Newton 9 years ago
parent 077fb78735
commit 359a25b908

@ -0,0 +1,38 @@
diff -rupN wxWidgets-3.0.2-orig/src/gtk/renderer.cpp wxWidgets-3.0.2/src/gtk/renderer.cpp
--- wxWidgets-3.0.2-orig/src/gtk/renderer.cpp 2015-11-05 19:57:31.075151404 -0500
+++ wxWidgets-3.0.2/src/gtk/renderer.cpp 2015-11-05 20:37:56.230764763 -0500
@@ -41,6 +41,10 @@
#include "wx/gtk/private.h"
#include "wx/gtk/private/gtk2-compat.h"
+#if defined(__WXGTK3__) && !GTK_CHECK_VERSION(3,14,0)
+ #define GTK_STATE_FLAG_CHECKED (1 << 11)
+#endif
+
// ----------------------------------------------------------------------------
// wxRendererGTK: our wxRendererNative implementation
// ----------------------------------------------------------------------------
@@ -551,7 +555,11 @@ wxRendererGTK::DrawCheckBox(wxWindow* wi
{
int stateFlags = GTK_STATE_FLAG_NORMAL;
if (flags & wxCONTROL_CHECKED)
+ {
stateFlags = GTK_STATE_FLAG_ACTIVE;
+ if (gtk_check_version(3,14,0) == NULL)
+ stateFlags = GTK_STATE_FLAG_CHECKED;
+ }
if (flags & wxCONTROL_DISABLED)
stateFlags |= GTK_STATE_FLAG_INSENSITIVE;
if (flags & wxCONTROL_UNDETERMINED)
@@ -866,7 +874,11 @@ void wxRendererGTK::DrawRadioBitmap(wxWi
#ifdef __WXGTK3__
int state = GTK_STATE_FLAG_NORMAL;
if (flags & wxCONTROL_CHECKED)
+ {
state = GTK_STATE_FLAG_ACTIVE;
+ if (gtk_check_version(3,14,0) == NULL)
+ state = GTK_STATE_FLAG_CHECKED;
+ }
else if (flags & wxCONTROL_UNDETERMINED)
state = GTK_STATE_FLAG_INCONSISTENT;
if (flags & wxCONTROL_DISABLED)

@ -11,7 +11,7 @@
Name: %{wxgtkname} Name: %{wxgtkname}
Version: 3.0.2 Version: 3.0.2
Release: 10%{?dist} Release: 11%{?dist}
Summary: GTK port of the wxWidgets GUI library Summary: GTK port of the wxWidgets GUI library
License: wxWidgets License: wxWidgets
Group: System Environment/Libraries Group: System Environment/Libraries
@ -22,15 +22,19 @@ Source10: wx-config
# https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # https://bugzilla.redhat.com/show_bug.cgi?id=1225148
# remove abort when ABI check fails # remove abort when ABI check fails
# Backport from wxGTK # Backport from wxGTK
Patch0: wxGTK3-3.0.2-abicheck.patch Patch0: %{name}-%{version}-abicheck.patch
# This is a collection of fixes from upstream # This is a collection of fixes from upstream
# to fix warnings and crashes. See bug for details: # to fix warnings and crashes. See bug for details:
# https://bugzilla.redhat.com/show_bug.cgi?id=1234211 # https://bugzilla.redhat.com/show_bug.cgi?id=1234211
Patch1: wxGTK3-3.0.2-upstreamfixes.patch Patch1: %{name}-%{version}-upstreamfixes.patch
# This fixes the spinbutton on gtk 3.12 # This fixes the spinbutton on gtk 3.12+
# For more details, seem the upstream commit: # For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59 # https://github.com/wxWidgets/wxWidgets/commit/312ae4c92cec95954557347c2b7a9e24d4398a59
Patch2: wxGTK3-3.0.2-spibuttfix.patch Patch2: %{name}-%{version}-spibuttfix.patch
# This fixes checkbox/radiobutton on gtk 3.14+
# For more details, see the upstream commit:
# https://github.com/wxWidgets/wxWidgets/commit/c1d150ed1228c155054cf1fa90932ced7371e6a4
Patch2: %{name}-%{version}-checkradio.patch
BuildRequires: gtk%{gtkver}-devel BuildRequires: gtk%{gtkver}-devel
#Note webkitgtk (GTK2) does not appear to be supported #Note webkitgtk (GTK2) does not appear to be supported
%if %{gtkver} == 3 %if %{gtkver} == 3
@ -256,6 +260,9 @@ popd
%doc html %doc html
%changelog %changelog
* Thu Nov 5 2015 Jeremy Newton <alexjnewt@hotmail.com> - 3.0.2-11
- Added patch to fix checkbox and radio button issues for f21 onwards
* Sun Nov 1 2015 Jeremy Newton <alexjnewt@hotmail.com> - 3.0.2-10 * Sun Nov 1 2015 Jeremy Newton <alexjnewt@hotmail.com> - 3.0.2-10
- Removed depreciated/retired libgnomeprintui22 - Removed depreciated/retired libgnomeprintui22

Loading…
Cancel
Save