From 359a25b908a1c8a1e94210aeb11ff9cb484d8363 Mon Sep 17 00:00:00 2001 From: Jeremy Newton Date: Thu, 5 Nov 2015 20:54:49 -0500 Subject: [PATCH] Add upstream patch, fix RH#1268615 --- wxGTK3-3.0.2-checkradio.patch | 38 +++++++++++++++++++++++++++++++++++ wxGTK3.spec | 19 ++++++++++++------ 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 wxGTK3-3.0.2-checkradio.patch diff --git a/wxGTK3-3.0.2-checkradio.patch b/wxGTK3-3.0.2-checkradio.patch new file mode 100644 index 0000000..fd9ba15 --- /dev/null +++ b/wxGTK3-3.0.2-checkradio.patch @@ -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) diff --git a/wxGTK3.spec b/wxGTK3.spec index 52d8448..b965ed7 100644 --- a/wxGTK3.spec +++ b/wxGTK3.spec @@ -11,7 +11,7 @@ Name: %{wxgtkname} Version: 3.0.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: GTK port of the wxWidgets GUI library License: wxWidgets Group: System Environment/Libraries @@ -22,15 +22,19 @@ Source10: wx-config # https://bugzilla.redhat.com/show_bug.cgi?id=1225148 # remove abort when ABI check fails # Backport from wxGTK -Patch0: wxGTK3-3.0.2-abicheck.patch +Patch0: %{name}-%{version}-abicheck.patch # This is a collection of fixes from upstream # to fix warnings and crashes. See bug for details: # https://bugzilla.redhat.com/show_bug.cgi?id=1234211 -Patch1: wxGTK3-3.0.2-upstreamfixes.patch -# This fixes the spinbutton on gtk 3.12 -# For more details, seem the upstream commit: +Patch1: %{name}-%{version}-upstreamfixes.patch +# This fixes the spinbutton on gtk 3.12+ +# For more details, see the upstream commit: # 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 #Note webkitgtk (GTK2) does not appear to be supported %if %{gtkver} == 3 @@ -256,6 +260,9 @@ popd %doc html %changelog +* Thu Nov 5 2015 Jeremy Newton - 3.0.2-11 +- Added patch to fix checkbox and radio button issues for f21 onwards + * Sun Nov 1 2015 Jeremy Newton - 3.0.2-10 - Removed depreciated/retired libgnomeprintui22