diff --git a/phatch-wxpy3.0-compat.patch b/phatch-wxpy3.0-compat.patch new file mode 100644 index 0000000..481166a --- /dev/null +++ b/phatch-wxpy3.0-compat.patch @@ -0,0 +1,160 @@ +Description: Updates for wxPython3.0 + Retains compatibility with 2.8 - there wx.InitAllImageHandlers() is a no-op + and wx.THICK_FRAME has the same value as wx.RESIZE_BORDER. +Author: Olly Betts +Bug-Debian: https://bugs.debian.org/758942 +Forwarded: no +Last-Update: 2014-08-31 + +--- phatch-0.2.7.1.orig/phatch/lib/pyWx/dialogsInspector.py ++++ phatch-0.2.7.1/phatch/lib/pyWx/dialogsInspector.py +@@ -76,7 +76,6 @@ if __name__ == "__main__": + gettext.install("app") # replace with the appropriate catalog name + + app = wx.PySimpleApp(0) +- wx.InitAllImageHandlers() + dialog = AddTagDialog(None, -1, "") + app.SetTopWindow(dialog) + dialog.Show() +--- phatch-0.2.7.1.orig/phatch/lib/pyWx/imageInspector.py ++++ phatch-0.2.7.1/phatch/lib/pyWx/imageInspector.py +@@ -792,7 +792,7 @@ class Grid(droplet.Mixin, gridlib.Grid): + class OpenMixin(object): + + def OnOpen(self, event): +- style = wx.OPEN | wx.CHANGE_DIR ++ style = wx.FD_OPEN | wx.FD_CHANGE_DIR + if hasattr(wx, 'FD_PREVIEW'): + style |= wx.FD_PREVIEW + path = os.path.dirname(self.image_table.images[-1].filename) +--- phatch-0.2.7.1.orig/phatch/lib/pyWx/paint.py ++++ phatch-0.2.7.1/phatch/lib/pyWx/paint.py +@@ -115,7 +115,6 @@ def example(): + + class TestApp(wx.App): + def OnInit(self): +- wx.InitAllImageHandlers() + frame = TestFrame(None, -1, "Test", size=(600, 400)) + frame.EnableBackgroundPainting(frame) # ,color=(245,245,255)) + self.SetTopWindow(frame) +--- phatch-0.2.7.1.orig/phatch/lib/pyWx/popup.py ++++ phatch-0.2.7.1/phatch/lib/pyWx/popup.py +@@ -415,7 +415,7 @@ class FileCtrl(_PathCtrl): + wildcard = _t('All files') + '|*' + + def OnBrowse(self, event): +- style = wx.OPEN | wx.CHANGE_DIR ++ style = wx.FD_OPEN | wx.FD_CHANGE_DIR + if hasattr(wx, 'FD_PREVIEW'): + style |= wx.FD_PREVIEW + dlg = wx.FileDialog(self, self._to_local("Choose a file"), +--- phatch-0.2.7.1.orig/phatch/pyWx/dialogs.py ++++ phatch-0.2.7.1/phatch/pyWx/dialogs.py +@@ -133,7 +133,7 @@ class ExecuteDialog(BrowseMixin, dialogs + self.set_drop(drop) + + def browse_files(self): +- style = wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR ++ style = wx.FD_OPEN | wx.FD_MULTIPLE | wx.FD_CHANGE_DIR + if hasattr(wx, 'FD_PREVIEW'): + style |= wx.FD_PREVIEW + dlg = wx.FileDialog( +@@ -529,7 +529,6 @@ def example(): + class App(wx.App): + + def OnInit(self): +- wx.InitAllImageHandlers() + frame = wx.Frame(None, -1, "") + self.SetTopWindow(frame) + frame.Show(False) +--- phatch-0.2.7.1.orig/phatch/pyWx/gui.py ++++ phatch-0.2.7.1/phatch/pyWx/gui.py +@@ -29,7 +29,7 @@ import sys + #check wx + from lib.pyWx.wxcheck import ensure + try: +- wx = ensure('2.8', '2.8') ++ wx = ensure('3.0', '2.8') + except: + #sphinx + import wx +@@ -560,7 +560,7 @@ class Frame(DialogsMixin, dialogs.Browse + message=_('Choose an Action List File...'), + defaultDir=os.path.dirname(self.filename), + wildcard=ct.WILDCARD, +- style=wx.OPEN, ++ style=wx.FD_OPEN, + ) + if dlg.ShowModal() == wx.ID_OK: + filename = dlg.GetPath() +@@ -592,7 +592,7 @@ class Frame(DialogsMixin, dialogs.Browse + message=_('Save Action List As...'), + defaultDir=default_dir, + wildcard=ct.WILDCARD, +- style=wx.SAVE | wx.OVERWRITE_PROMPT, ++ style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, + ) + if dlg.ShowModal() == wx.ID_OK: + saved = True +@@ -1054,7 +1054,6 @@ class ImageInspectorApp(wx.App): + super(ImageInspectorApp, self).__init__(*args, **keyw) + + def OnInit(self): +- wx.InitAllImageHandlers() + _theme() + frame = dialogs.ImageInspectorFrame(None, + size=dialogs.imageInspector.SIZE) +@@ -1092,7 +1092,6 @@ class DropletFrame(DialogsMixin, wx.Fram + class DropletMixin: + + def OnInit(self): +- wx.InitAllImageHandlers() + #do all application initialisation + self.init() + api.init() +@@ -1191,7 +1191,6 @@ class App(DropletMixin, wx.App): + super(App, self).__init__(*args, **keyw) + + def OnInit(self): +- wx.InitAllImageHandlers() + #frame + self.splash = self._splash() + self.splash.CentreOnScreen() +--- phatch-0.2.7.1.orig/phatch/pyWx/wxGlade/dialogs.py ++++ phatch-0.2.7.1/phatch/pyWx/wxGlade/dialogs.py +@@ -65,7 +65,7 @@ class FolderFileBrowser(ffb.PreviewMixin + class ImageTreeDialog(wx.Dialog): + def __init__(self, data, Data, headers, *args, **kwds): + # begin wxGlade: ImageTreeDialog.__init__ +- kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.THICK_FRAME ++ kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX + wx.Dialog.__init__(self, *args, **kwds) + self.panel = wx.Panel(self, -1) + self.browser = FolderFileBrowser(self.panel, -1, data, Data, headers) +@@ -232,7 +232,7 @@ class ErrorDialog(wx.Dialog): + class FilesDialog(wx.Dialog): + def __init__(self, *args, **kwds): + # begin wxGlade: FilesDialog.__init__ +- kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.THICK_FRAME ++ kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX + wx.Dialog.__init__(self, *args, **kwds) + self.icon = wx.StaticBitmap(self, -1, wx.NullBitmap) + self.message = wx.StaticText(self, -1, _("Message")) +@@ -369,7 +369,6 @@ if __name__ == "__main__": + gettext.install("app") # replace with the appropriate catalog name + + app = wx.PySimpleApp(0) +- wx.InitAllImageHandlers() + aboutDialog = StatusDialog(None, -1, "") + app.SetTopWindow(aboutDialog) + aboutDialog.Show() +--- phatch-0.2.7.1.orig/phatch/pyWx/wxGlade/frame.py ++++ phatch-0.2.7.1/phatch/pyWx/wxGlade/frame.py +@@ -383,7 +383,6 @@ class Frame(wx.Frame): + + class App(wx.App): + def OnInit(self): +- wx.InitAllImageHandlers() + frame = Frame(None, -1, "") + self.SetTopWindow(frame) + frame.Show() diff --git a/phatch.spec b/phatch.spec index 2e8cb28..2648459 100644 --- a/phatch.spec +++ b/phatch.spec @@ -3,7 +3,7 @@ Name: phatch Version: 0.2.7 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Photo batch processor Group: Applications/Multimedia License: GPLv3+ @@ -26,6 +26,7 @@ Patch2: pyexiv2_compat.patch # https://bugzilla.redhat.com/show_bug.cgi?id=895778 Patch3: phatch-pillow.patch Patch4: phatch-gtk3-compatibility.patch +Patch5: phatch-wxpy3.0-compat.patch %description Phatch is a simple to use cross-platform GUI Photo Batch Processor @@ -81,6 +82,7 @@ sed -i -e "s@help_path =.*@help_path=\'%{_docdir}/%{name}\'@" %{name}/pyWx/gui.p %patch2 -p1 -b .orig %patch3 -p1 -b .orig %patch4 -p0 -b .orig +%patch5 -p1 -b .orig %build @@ -197,6 +199,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Tue Jul 07 2015 Jaromir Capik - 0.2.7-21 +- Adding wxpy3 compatibility patch from Olly Betts (#1192867) + * Tue Jul 07 2015 Jaromir Capik - 0.2.7-20 - Adding gtk3 compatibility patch from Scott Talbert (#1192867)