Merge branch 'WxPtyhon3-port'
authorAntonio Ospite <ao2@ao2.it>
Fri, 3 Oct 2014 11:00:02 +0000 (13:00 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 3 Oct 2014 11:00:02 +0000 (13:00 +0200)
CanvasFrame.py
CanvasModel.py
CanvasView.py
PoPiPaint.py

index 9822c4d..360e3e1 100755 (executable)
@@ -16,7 +16,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import wx
-from wx.lib.pubsub import Publisher as pub
+from wx.lib.pubsub import setuparg1
+from wx.lib.pubsub import pub
 from wx.lib.wordwrap import wordwrap
 
 import CanvasModel
index 49f9f64..d61f00b 100755 (executable)
@@ -18,7 +18,8 @@
 import sys
 from array import array
 import wx
-from wx.lib.pubsub import Publisher as pub
+from wx.lib.pubsub import setuparg1
+from wx.lib.pubsub import pub
 
 
 class Canvas:
index 28a7d0d..e91902e 100755 (executable)
@@ -67,7 +67,7 @@ class CanvasView(wx.Window):
 
         self.offset_angle = -pi/2.
 
-        self.SetSize((w, h))
+        self.SetInitialSize((w, h))
 
         self.SetFocus()
 
@@ -93,7 +93,7 @@ class CanvasView(wx.Window):
         # are bugs regarding bitmaps with alpha channels and MemoryDC
         self.grid_buffer = self.loadGrid("res/grid.png")
 
-        self.pixels_buffer = wx.EmptyBitmap(w, h, depth=32)
+        self.pixels_buffer = wx.EmptyBitmapRGBA(w, h, 0, 0 ,0, 255)
         self.drawAllPixels()
 
     def setPixelCoordinates(self, gc):
index 090126f..683f2a1 100755 (executable)
@@ -22,10 +22,10 @@ import wx
 import CanvasFrame
 
 
-class PoPiPaApp(wx.PySimpleApp):
+class PoPiPaApp(wx.App):
     def __init__(self, *args, **kwargs):
         self.base_image = kwargs.pop('base_image', None)
-        wx.PySimpleApp.__init__(self, *args, **kwargs)
+        wx.App.__init__(self, *args, **kwargs)
 
     def OnInit(self):
         # We do not want a resizeable frame!