[SCM] python-pyo/master: Adding wxpython3.0.patch
tiago at users.alioth.debian.org
tiago at users.alioth.debian.org
Fri Jan 30 04:34:09 UTC 2015
The following commit has been merged in the master branch:
commit 1dedda6822a44fe424e472b49a157538b13f3662
Author: Tiago Bortoletto Vaz <tiago at debian.org>
Date: Thu Jan 29 23:09:40 2015 -0500
Adding wxpython3.0.patch
diff --git a/debian/patches/wxpython3.0.patch b/debian/patches/wxpython3.0.patch
new file mode 100644
index 0000000..9c3e8c5
--- /dev/null
+++ b/debian/patches/wxpython3.0.patch
@@ -0,0 +1,128 @@
+Description: Update for wxPython 3.0
+ These changes should remain compatible with wxPython 2.8.
+Forwarded: no
+Last-Update: 2014-09-12
+
+Index: python-pyo-0.7/pyolib/_widgets.py
+===================================================================
+--- python-pyo-0.7.orig/pyolib/_widgets.py
++++ python-pyo-0.7/pyolib/_widgets.py
+@@ -29,10 +29,11 @@ except:
+ WITH_PIL = False
+
+ try:
+- import wxversion
+- if (wxversion.checkInstalled("2.8")):
++ if 'wx' not in sys.modules:
++ # Don't try to load if already loaded.
++ import wxversion
+ wxversion.ensureMinimal("2.8")
+- import wx
++ import wx
+ from _wxwidgets import *
+ PYO_USE_WX = True
+ except:
+Index: python-pyo-0.7/pyolib/_wxwidgets.py
+===================================================================
+--- python-pyo-0.7.orig/pyolib/_wxwidgets.py
++++ python-pyo-0.7/pyolib/_wxwidgets.py
+@@ -143,8 +143,8 @@ def powOfTwoToInt(x):
+ return POWOFTWO[x]
+
+ def GetRoundBitmap( w, h, r ):
+- maskColor = wx.Color(0,0,0)
+- shownColor = wx.Color(5,5,5)
++ maskColor = wx.Colour(0,0,0)
++ shownColor = wx.Colour(5,5,5)
+ b = wx.EmptyBitmap(w,h)
+ dc = wx.MemoryDC(b)
+ dc.SetBrush(wx.Brush(maskColor))
+Index: python-pyo-0.7/utils/E-Pyo.py
+===================================================================
+--- python-pyo-0.7.orig/utils/E-Pyo.py
++++ python-pyo-0.7/utils/E-Pyo.py
+@@ -2250,7 +2250,7 @@ class MainFrame(wx.Frame):
+ def saveListPaste(self, evt):
+ if self.pastingList != []:
+ dlg = wx.FileDialog(self, message="Save file as ...",
+- defaultDir=os.path.expanduser('~'), style=wx.SAVE)
++ defaultDir=os.path.expanduser('~'), style=wx.FD_SAVE)
+ if dlg.ShowModal() == wx.ID_OK:
+ path = ensureNFD(dlg.GetPath())
+ with open(path, "w") as f:
+@@ -2258,7 +2258,7 @@ class MainFrame(wx.Frame):
+
+ def loadListPaste(self, evt):
+ dlg = wx.FileDialog(self, message="Choose a file",
+- defaultDir=os.path.expanduser("~"), style=wx.OPEN)
++ defaultDir=os.path.expanduser("~"), style=wx.FD_OPEN)
+ if dlg.ShowModal() == wx.ID_OK:
+ path = dlg.GetPath()
+ self.pastingList = []
+@@ -2520,7 +2520,7 @@ class MainFrame(wx.Frame):
+ def insertPath(self, evt):
+ dlg = wx.FileDialog(self, message="Choose a file",
+ defaultDir=PREFERENCES.get("insert_path", os.path.expanduser("~")),
+- defaultFile="", style=wx.OPEN | wx.MULTIPLE)
++ defaultFile="", style=wx.FD_OPEN | wx.FD_MULTIPLE)
+ if dlg.ShowModal() == wx.ID_OK:
+ paths = dlg.GetPaths()
+ if len(paths) == 1:
+@@ -2710,7 +2710,7 @@ class MainFrame(wx.Frame):
+ def open(self, event, encoding=None):
+ dlg = wx.FileDialog(self, message="Choose a file",
+ defaultDir=PREFERENCES.get("open_file_path", os.path.expanduser("~")),
+- defaultFile="", style=wx.OPEN | wx.MULTIPLE)
++ defaultFile="", style=wx.FD_OPEN | wx.FD_MULTIPLE)
+ if dlg.ShowModal() == wx.ID_OK:
+ paths = dlg.GetPaths()
+ for path in paths:
+@@ -2775,7 +2775,7 @@ class MainFrame(wx.Frame):
+ deffile = os.path.split(self.panel.editor.path)[1]
+ dlg = wx.FileDialog(self, message="Save file as ...",
+ defaultDir=PREFERENCES.get("save_file_path", os.path.expanduser("~")),
+- defaultFile=deffile, style=wx.SAVE)
++ defaultFile=deffile, style=wx.FD_SAVE)
+ dlg.SetFilterIndex(0)
+ if dlg.ShowModal() == wx.ID_OK:
+ path = ensureNFD(dlg.GetPath())
+@@ -3594,7 +3594,7 @@ class Editor(stc.StyledTextCtrl):
+ dlg.Destroy()
+ if not self.path or "Untitled-" in self.path:
+ dlg2 = wx.FileDialog(None, message="Save file as ... (the file will be closed even if you pressed Cancel!)", defaultDir=os.getcwd(),
+- defaultFile="", style=wx.SAVE|wx.FD_OVERWRITE_PROMPT)
++ defaultFile="", style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+ dlg2.SetFilterIndex(0)
+ if dlg2.ShowModal() == wx.ID_OK:
+ path = dlg2.GetPath()
+@@ -3618,7 +3618,7 @@ class Editor(stc.StyledTextCtrl):
+ dlg.Destroy()
+ if not self.path or "Untitled-" in self.path:
+ dlg2 = wx.FileDialog(None, message="Save file as ...", defaultDir=os.getcwd(),
+- defaultFile="", style=wx.SAVE|wx.FD_OVERWRITE_PROMPT)
++ defaultFile="", style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+ dlg2.SetFilterIndex(0)
+ if dlg2.ShowModal() == wx.ID_OK:
+ path = dlg2.GetPath()
+@@ -3649,7 +3649,7 @@ class Editor(stc.StyledTextCtrl):
+ dlg.Destroy()
+ if not self.path or "Untitled-" in self.path:
+ dlg2 = wx.FileDialog(None, message="Save file as ...", defaultDir=os.getcwd(),
+- defaultFile="", style=wx.SAVE|wx.FD_OVERWRITE_PROMPT)
++ defaultFile="", style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
+ dlg2.SetFilterIndex(0)
+
+ if dlg2.ShowModal() == wx.ID_OK:
+Index: python-pyo-0.7/utils/PyoDoc.py
+===================================================================
+--- python-pyo-0.7.orig/utils/PyoDoc.py
++++ python-pyo-0.7/utils/PyoDoc.py
+@@ -1121,7 +1121,7 @@ def toSysEncoding(unistr):
+
+ if __name__ == "__main__":
+ DOC_AS_SINGLE_APP = True
+- app = wx.PySimpleApp()
++ app = wx.App(False)
+ doc_frame = ManualFrame()
+ doc_frame.Show()
+ app.MainLoop()
--
python-pyo packaging
More information about the pkg-multimedia-commits
mailing list