[SCM] soundgrain/master: Imported Debian patch 4.1.1-2.1

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Wed Dec 10 23:17:59 UTC 2014


The following commit has been merged in the master branch:
commit 25dd121814f7f25c7371957814a5b4c8201a03e5
Author: Olly Betts <olly at survex.com>
Date:   Tue Sep 9 21:09:48 2014 +0000

    Imported Debian patch 4.1.1-2.1

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 845ca06..0000000
--- a/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.pc
diff --git a/debian/changelog b/debian/changelog
index 4093f7b..d5d8bda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+soundgrain (4.1.1-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update for wxPython 3.0 (Closes: #759058):
+    - New patch: wxpython3.0.patch
+
+ -- Olly Betts <olly at survex.com>  Tue, 09 Sep 2014 21:09:48 +0000
+
 soundgrain (4.1.1-2) unstable; urgency=low
 
   * Changes arch to all and build-depends on python-all (>= 2.6.6-3~);
diff --git a/debian/control b/debian/control
index 9d9f87d..bcc4c45 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Homepage: http://code.google.com/p/soundgrain/
 
 Package: soundgrain
 Architecture: all
-Depends: python (>= 2.6), python-wxgtk2.8, python-pyo, ${misc:Depends}
+Depends: python (>= 2.6), python-wxgtk3.0, python-pyo, ${misc:Depends}
 Description: Graphical interface to control granular sound synthesis modules
  Soundgrain is a graphical interface where users can draw and edit trajectories
  to control granular sound synthesis. It is written in Python and WxPython and
diff --git a/debian/patches/series b/debian/patches/series
index 5c89269..798bb86 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 use-distutils.patch
+wxpython3.0.patch
diff --git a/debian/patches/wxpython3.0.patch b/debian/patches/wxpython3.0.patch
new file mode 100644
index 0000000..f9d2ddd
--- /dev/null
+++ b/debian/patches/wxpython3.0.patch
@@ -0,0 +1,154 @@
+Description: Update for wxPython 3.0
+ These changes should remain compatible with wxPython 2.8.
+Bug-Debian: https://bugs.debian.org/759058
+Forwarded: no
+Last-Update: 2014-09-07
+
+Index: soundgrain-4.1.1/Resources/FxBall.py
+===================================================================
+--- soundgrain-4.1.1.orig/Resources/FxBall.py
++++ soundgrain-4.1.1/Resources/FxBall.py
+@@ -152,8 +152,8 @@ def getColors(col, gradient):
+     return firstColor, secondColor
+ 
+ def GetRoundMaskBitmap(w, h, radius):
+-    maskColor = wx.Color(30,30,30)
+-    shownColor = wx.Color(29,29,29)
++    maskColor = wx.Colour(30,30,30)
++    shownColor = wx.Colour(29,29,29)
+     b = wx.EmptyBitmap(w,h)
+     dc = wx.MemoryDC(b)
+     dc.SetPen(wx.Pen(maskColor, 1))
+@@ -168,7 +168,7 @@ def GetRoundMaskBitmap(w, h, radius):
+ 
+ def GetRoundBitmap(w, h, mask, col, gradient):
+     firstColor, secondColor = getColors(col, gradient)
+-    maskColor = wx.Color(30,30,30)
++    maskColor = wx.Colour(30,30,30)
+     b = wx.EmptyBitmap(w,h)
+     dc = wx.MemoryDC(b)
+     dc.SetPen(wx.Pen(maskColor, 1))
+Index: soundgrain-4.1.1/Resources/splash.py
+===================================================================
+--- soundgrain-4.1.1.orig/Resources/splash.py
++++ soundgrain-4.1.1/Resources/splash.py
+@@ -63,12 +63,7 @@ class SoundGrainSplashScreen(wx.Frame):
+         dc.DrawRectangle(0,0,w,h)
+         dc.DrawBitmap(self.bmp, 0,0,True)
+         dc.SetTextForeground("#FFFFFF")
+-        font = dc.GetFont()
+-        if PLATFORM == "win32":
+-            pass
+-        else:
+-            font.SetFaceName("Monaco")
+-            font.SetPixelSize((15,15))
++        font = wx.FFontFromPixelSize(pixelSize=(15,15), family=wx.FONTFAMILY_DEFAULT, face="Monaco")
+         dc.SetFont(font)
+         dc.DrawLabel(u"Olivier Bélanger", wx.Rect(0, 320, 400, 15), wx.ALIGN_CENTER)
+         dc.DrawLabel("iACT, %s" % SG_YEAR, wx.Rect(0, 335, 400, 15), wx.ALIGN_CENTER)
+@@ -80,6 +75,11 @@ class SoundGrainSplashScreen(wx.Frame):
+         self.Destroy()
+ 
+ if __name__ == '__main__':
+-    app = wx.PySimpleApp()
++    class MySimpleApp(wx.App):
++        def OnInit(self):
++            # Suppress WXDEBUG assertions, as happens by default with wx2.8.
++            #self.SetAssertMode(wx.PYAPP_ASSERT_SUPPRESS)
++            return True
++    app = MySimpleApp()
+     frame = SoundGrainSplashScreen(None, img="SoundGrainSplash.png")
+     app.MainLoop()
+Index: soundgrain-4.1.1/SoundGrain.py
+===================================================================
+--- soundgrain-4.1.1.orig/SoundGrain.py
++++ soundgrain-4.1.1/SoundGrain.py
+@@ -286,12 +286,12 @@ class DrawingSurface(wx.Panel):
+         return self.oscilScaling
+ 
+     def SetColors(self, outline, bg, fill, rect, losa, wave):
+-        self.outlinecolor = wx.Color(*outline)
+-        self.backgroundcolor = wx.Color(*bg)
+-        self.fillcolor = wx.Color(*fill)
+-        self.rectcolor = wx.Color(*rect)
+-        self.losacolor = wx.Color(*losa)
+-        self.wavecolor = wx.Color(*wave)
++        self.outlinecolor = wx.Colour(*outline)
++        self.backgroundcolor = wx.Colour(*bg)
++        self.fillcolor = wx.Colour(*fill)
++        self.rectcolor = wx.Colour(*rect)
++        self.losacolor = wx.Colour(*losa)
++        self.wavecolor = wx.Colour(*wave)
+         self.losaBrush = wx.Brush(self.losacolor, wx.SOLID)
+         self.losaPen = wx.Pen(self.losacolor, width=1, style=wx.SOLID)
+ 
+@@ -1310,7 +1310,7 @@ class ControlPanel(scrolled.ScrolledPane
+                             defaultFile="",
+                             wildcard="AIFF file |*.aif;*.aiff;*.aifc;*.AIF;*.AIFF;*.Aif;*.Aiff|" \
+                                      "Wave file |*.wav;*.wave;*.WAV;*.WAVE;*.Wav;*.Wave",
+-                            style=wx.OPEN)
++                            style=wx.FD_OPEN)
+         if dlg.ShowModal() == wx.ID_OK:
+             sndPath = dlg.GetPath()
+             self.loadSound(ensureNFD(sndPath))
+@@ -1322,7 +1322,7 @@ class ControlPanel(scrolled.ScrolledPane
+                             defaultFile="",
+                             wildcard="AIFF file |*.aif;*.aiff;*.aifc;*.AIF;*.AIFF;*.Aif;*.Aiff|" \
+                                      "Wave file |*.wav;*.wave;*.WAV;*.WAVE;*.Wav;*.Wave",
+-                            style=wx.OPEN)
++                            style=wx.FD_OPEN)
+         if dlg.ShowModal() == wx.ID_OK:
+             ok = True
+             sndPath = dlg.GetPath()
+@@ -2053,7 +2053,7 @@ class MainFrame(wx.Frame):
+         dlg = wx.FileDialog(self, message="Open SoundGrain file...",
+                             defaultFile="",
+                             wildcard="SoundGrain file (*.sg)|*.sg",
+-                            style=wx.OPEN)
++                            style=wx.FD_OPEN)
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+             self.loadFile(ensureNFD(path))
+@@ -2077,7 +2077,7 @@ class MainFrame(wx.Frame):
+     def handleSaveAs(self, evt):
+         dlg = wx.FileDialog(self, message="Save file as ...",
+                             defaultFile="Granulator.sg",
+-                            style=wx.SAVE)
++                            style=wx.FD_SAVE)
+         if dlg.ShowModal() == wx.ID_OK:
+             path = dlg.GetPath()
+             if os.path.isfile(path):
+@@ -2323,7 +2323,7 @@ class MainFrame(wx.Frame):
+                 wildcard = "AIFF file|*.aiff;*.aif|" \
+                            "Wave file|*.wave;*.wav"
+                 dlg2 = wx.FileDialog(self, message="Choose a filename...", defaultDir=os.getcwd(),
+-                    defaultFile="mixedtable.wav", wildcard=wildcard, style=wx.SAVE | wx.CHANGE_DIR)
++                    defaultFile="mixedtable.wav", wildcard=wildcard, style=wx.FD_SAVE | wx.FD_CHANGE_DIR)
+                 if dlg2.ShowModal() == wx.ID_OK:
+                     path = dlg2.GetPath()
+                     if path != "":
+@@ -2461,10 +2461,10 @@ class MainFrame(wx.Frame):
+         info.Copyright = u'(C) %s Olivier Bélanger' % SG_YEAR
+         wx.AboutBox(info)
+ 
+-class SoundGrainApp(wx.PySimpleApp):
++class SoundGrainApp(wx.App):
+     def __init__(self, *args, **kwargs):
+         global SCREEN_SIZE
+-        wx.PySimpleApp.__init__(self, *args, **kwargs)
++        wx.App.__init__(self, *args, **kwargs)
+         X,Y = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X), wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
+         SCREEN_SIZE = (X, Y)
+         if X < 900: sizex = X - 40
+@@ -2476,6 +2476,11 @@ class SoundGrainApp(wx.PySimpleApp):
+         self.frame = MainFrame(None, -1, pos=(20,20), size=(sizex,sizey))
+         self.loadFile = self.frame.loadFile
+ 
++    def OnInit(self):
++        # Suppress WXDEBUG assertions, as happens by default with wx2.8.
++        #self.SetAssertMode(wx.PYAPP_ASSERT_SUPPRESS)
++        return True
++
+     def MacOpenFile(self, filename):
+         self.loadFile(ensureNFD(filename))
+ 

-- 
soundgrain packaging



More information about the pkg-multimedia-commits mailing list