[congruity] Include upstream patch for wxPython 3.0 support (#1177990)

Scott Talbert swt2c at fedoraproject.org
Thu Jan 1 03:41:20 UTC 2015


commit 4fce27cc52adb38e7c8eca841ad8a84e791c81af
Author: Scott Talbert <swt at techie.net>
Date:   Wed Dec 31 22:40:48 2014 -0500

    Include upstream patch for wxPython 3.0 support (#1177990)

 congruity.spec    |    8 ++-
 wxpython3.0.patch |  162 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 169 insertions(+), 1 deletions(-)
---
diff --git a/congruity.spec b/congruity.spec
index 5eafbb2..8392580 100644
--- a/congruity.spec
+++ b/congruity.spec
@@ -1,6 +1,6 @@
 Name:		congruity
 Version:	18
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Applications to program Logitech Harmony universal remote controls
 
 Group:		Applications/System
@@ -8,6 +8,8 @@ Group:		Applications/System
 License:	GPLv3+ and GPLv2+ and GPL+ and CC-BY-SA
 URL:		http://sourceforge.net/projects/congruity
 Source0:	http://downloads.sourceforge.net/congruity/%{name}-%{version}.tar.bz2
+# Include upstream patch to add wxPython 3.0 support
+Patch0:		wxpython3.0.patch
 BuildArch:	noarch
 
 BuildRequires:	desktop-file-utils
@@ -33,6 +35,7 @@ This includes the Harmony 200 and Harmony 300. To use it, simply run
 
 %prep
 %setup -q
+%patch0 -p1 -b .wxpython3.0
 
 %build
 
@@ -57,6 +60,9 @@ update-desktop-database &> /dev/null || :
 %{_mandir}/*/*
 
 %changelog
+* Wed Dec 31 2014 Scott Talbert <swt at techie.net> - 18-3
+- Include upstream patch for wxPython 3.0 support (#1177990)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 18-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/wxpython3.0.patch b/wxpython3.0.patch
new file mode 100644
index 0000000..fb9d4d8
--- /dev/null
+++ b/wxpython3.0.patch
@@ -0,0 +1,162 @@
+commit 28f785f3509969bae614cc6584200e1362a4c249
+Author: Scott Talbert <swt at techie.net>
+Date:   Wed Sep 10 20:01:25 2014 -0400
+
+    Support wxPython 3.0
+
+Origin: upstream, http://sourceforge.net/p/congruity/code/ci/28f785f3509969bae614cc6584200e1362a4c249/
+Bug-Debian: https://bugs.debian.org/759045
+
+diff --git a/congruity b/congruity
+index 3ba1844..54c6783 100755
+--- a/congruity
++++ b/congruity
+@@ -38,7 +38,7 @@ try:
+     import libconcord
+ except:
+     str = traceback.format_exc()
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     dlg = wx.MessageDialog(
+         None,
+         "Could not load libconcord; please ensure it, and the Python "
+@@ -54,7 +54,7 @@ try:
+     libconcord.update_configuration
+ except:
+     str = traceback.format_exc()
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     dlg = wx.MessageDialog(
+         None,
+         "Could not load the correct version of libconcord; please ensure "
+@@ -225,6 +225,7 @@ class DecoratedContainer(wx.Panel):
+         wx.Panel.__init__(self, parent)
+ 
+         self.sizer = wx.GridBagSizer(5, 5)
++        self.sizer.SetCols(3)
+         self.sizer.AddGrowableCol(2)
+         self.SetSizer(self.sizer)
+ 
+@@ -1577,7 +1578,7 @@ class Wizard(wx.Dialog):
+         resources,
+         app_finalizer,
+         min_page_width = 658,
+-        min_page_height = 550
++        min_page_height = 560
+     ):
+         self.app_finalizer = app_finalizer
+ 
+@@ -1652,7 +1653,7 @@ class Wizard(wx.Dialog):
+             size_page = self.GetSizeTuple()
+             size_wiz = tuple_max(size_wiz, size_page)
+             page.Hide()
+-            self.sizer_top_right.Remove(page)
++            self.sizer_top_right.Detach(page)
+ 
+         if self.min_page_width and (size_wiz[0] < self.min_page_width):
+             size_wiz = (self.min_page_width, size_wiz[1])
+@@ -1660,7 +1661,7 @@ class Wizard(wx.Dialog):
+         if self.min_page_height and (size_wiz[1] < self.min_page_height):
+             size_wiz = (size_wiz[0], self.min_page_height )
+ 
+-        self.SetSize(size_wiz)
++        self.SetClientSize(size_wiz)
+ 
+     def SetInitialPage(self, page):
+         if self.cur_page:
+@@ -1711,7 +1712,7 @@ class Wizard(wx.Dialog):
+             prev_page = self.cur_page
+             if prev_page:
+                 prev_page.Hide()
+-                self.sizer_top_right.Remove(prev_page)
++                self.sizer_top_right.Detach(prev_page)
+ 
+             self.cur_page = page
+ 
+@@ -1874,8 +1875,7 @@ def main(argv):
+         ezhex_filename = None
+         initial_exception = ("Command-line error", exception_message())
+ 
+-    app = wx.PySimpleApp()
+-    wx.InitAllImageHandlers()
++    app = wx.App(False)
+ 
+     resources = Resources(appdir, no_web)
+     resources.LoadImages()
+diff --git a/mhgui b/mhgui
+index 1c8746d..66c7413 100755
+--- a/mhgui
++++ b/mhgui
+@@ -53,7 +53,7 @@ try:
+     import libconcord
+ except:
+     str = traceback.format_exc()
+-    app = wx.PySimpleApp()
++    app = wx.App(False)
+     dlg = wx.MessageDialog(
+         None,
+         "Could not load libconcord; please ensure it, and the Python "
+@@ -84,15 +84,15 @@ class ThrobberDialog(wx.Dialog):
+             self.title = self.TITLE_WEBSITE
+         else:
+             self.title = title
+-        wx.Dialog.__init__(self, None, -1, size=(256, 256), title=self.title)
++        wx.Dialog.__init__(self, None, -1, title=self.title)
++        self.SetClientSize((256, 256))
+         self.SetBackgroundColour("white")
+         self.gif = wx.animate.GIFAnimationCtrl(self, -1,
+                                                self.FindGif("throbber.gif"))
+         self.gif.GetPlayer().UseBackgroundColour(True)
+         self.gif.Play()
+         self.sizer = wx.BoxSizer(wx.VERTICAL)
+-        self.sizer.AddSpacer(64)
+-        self.sizer.Add(self.gif, 0, wx.ALIGN_CENTER_HORIZONTAL)
++        self.sizer.Add(self.gif, 1, wx.EXPAND|wx.ALL, 64)
+         self.SetSizer(self.sizer)
+     def FindGif(self, filename):
+         appdir = os.path.abspath(os.path.dirname(sys.argv[0]))
+@@ -1549,6 +1549,7 @@ class FavoriteChannelsPanel(WizardPanelBase):
+                 if button.ButtonType == "FavoriteChannelButton":
+                     self.remoteButtonsList.append(button.ButtonKey)
+             self.remoteButtonsListBox.Set(self.remoteButtonsList)
++        self.Fit()
+         self.parent.Show()
+ 
+     def OnRemoteButtonSelection(self, event):
+@@ -2646,7 +2647,7 @@ class Wizard(wx.Dialog):
+             size_page = self.GetSizeTuple()
+             size_wiz = tuple_max(size_wiz, size_page)
+             page.Hide()
+-            self.sizer_top_right.Remove(page)
++            self.sizer_top_right.Detach(page)
+ 
+         if self.min_page_width and (size_wiz[0] < self.min_page_width):
+             size_wiz = (self.min_page_width, size_wiz[1])
+@@ -2654,7 +2655,7 @@ class Wizard(wx.Dialog):
+         if self.min_page_height and (size_wiz[1] < self.min_page_height):
+             size_wiz = (size_wiz[0], self.min_page_height )
+ 
+-        self.SetSize(size_wiz)
++        self.SetClientSize(size_wiz)
+ 
+     def SetInitialPage(self, page):
+         if self.cur_page:
+@@ -2716,7 +2717,7 @@ class Wizard(wx.Dialog):
+             prev_page = self.cur_page
+             if prev_page:
+                 prev_page.Hide()
+-                self.sizer_top_right.Remove(prev_page)
++                self.sizer_top_right.Detach(prev_page)
+ 
+             self.cur_page = page
+ 
+@@ -2807,8 +2808,7 @@ class Finalizer(object):
+ def main(argv):
+     appdir = os.path.dirname(argv[0])
+ 
+-    app = wx.PySimpleApp()
+-    wx.InitAllImageHandlers()
++    app = wx.App(False)
+ 
+     resources = Resources(appdir, True)
+     resources.LoadImages()


More information about the scm-commits mailing list