From a27aaf9147447d0c48355b049ba98281844af27b Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Tue, 29 Sep 2015 23:19:59 -0400 Subject: [PATCH] Add patch to workaround TextCtrl height issue in ListCtrl mixin (#1264698) --- wxPython-3.0.2.0-listctrl-mixin-edit.patch | 16 ++++++++++++++++ wxPython.spec | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 wxPython-3.0.2.0-listctrl-mixin-edit.patch diff --git a/wxPython-3.0.2.0-listctrl-mixin-edit.patch b/wxPython-3.0.2.0-listctrl-mixin-edit.patch new file mode 100644 index 0000000..47a6b16 --- /dev/null +++ b/wxPython-3.0.2.0-listctrl-mixin-edit.patch @@ -0,0 +1,16 @@ +diff -up wxPython-src-3.0.2.0/wxPython/wx/lib/mixins/listctrl.py.editzeroheight wxPython-src-3.0.2.0/wxPython/wx/lib/mixins/listctrl.py +--- wxPython-src-3.0.2.0/wxPython/wx/lib/mixins/listctrl.py.editzeroheight 2014-10-13 18:37:52.000000000 -0400 ++++ wxPython-src-3.0.2.0/wxPython/wx/lib/mixins/listctrl.py 2015-09-29 20:57:15.334780365 -0400 +@@ -604,7 +604,11 @@ class TextEditMixin: + y0 = self.GetItemRect(row)[1] + + editor = self.editor +- editor.SetDimensions(x0-scrolloffset,y0, x1,-1) ++ # Temp fix: for some reason on GTK3, setting the height as -1 (default) ++ # with the above code flow results in the height being zero. Work ++ # around this by setting the height to the existing height. Upstream ++ # bug reported: http://trac.wxwidgets.org/ticket/17160 ++ editor.SetDimensions(x0-scrolloffset,y0, x1,editor.GetSize()[1]) + + editor.SetValue(self.GetItem(row, col).GetText()) + editor.Show() diff --git a/wxPython.spec b/wxPython.spec index 9bb95be..2dec501 100644 --- a/wxPython.spec +++ b/wxPython.spec @@ -5,7 +5,7 @@ Name: wxPython Version: 3.0.2.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: GUI toolkit for the Python programming language @@ -21,6 +21,8 @@ Patch1: wxPython-3.0.0.0-format.patch Patch2: wxPython-3.0.2.0-getxwindowcrash.patch # http://trac.wxwidgets.org/ticket/16767 Patch3: wxPython-3.0.2.0-plot.patch +# http://trac.wxwidgets.org/ticket/17160 +Patch4: wxPython-3.0.2.0-listctrl-mixin-edit.patch # make sure to keep this updated as appropriate BuildRequires: wxGTK3-devel >= 3.0.0 BuildRequires: python-devel @@ -62,6 +64,7 @@ Documentation, samples and demo application for wxPython. %patch1 -p1 -b .format %patch2 -p1 -b .getxwindowcrash %patch3 -p1 -b .plot +%patch4 -p1 -b .listctrl-mixin-edit # fix libdir otherwise additional wx libs cannot be found, fix default optimization flags sed -i -e 's|/usr/lib|%{_libdir}|' -e 's|-O3|-O2|' wxPython/config.py @@ -112,6 +115,9 @@ mv $RPM_BUILD_ROOT%{python_sitelib}/wxversion.py* $RPM_BUILD_ROOT%{python_sitear %changelog +* Tue Sep 29 2015 Scott Talbert - 3.0.2.0-7 +- Add patch to workaround TextCtrl height issue in ListCtrl mixin (#1264698) + * Fri Jun 19 2015 Fedora Release Engineering - 3.0.2.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild