From: Antonio Ospite Date: Fri, 3 Oct 2014 11:00:02 +0000 (+0200) Subject: Merge branch 'WxPtyhon3-port' X-Git-Url: https://git.ao2.it/PoPiPaint.git/commitdiff_plain/03fa793ef7490ece5ec44b23cc76316b26246e5a?hp=e6d30e1ba5eb5a9cd74f6ace57324b9e117158bc Merge branch 'WxPtyhon3-port' --- diff --git a/CanvasFrame.py b/CanvasFrame.py index 9822c4d..360e3e1 100755 --- a/CanvasFrame.py +++ b/CanvasFrame.py @@ -16,7 +16,8 @@ # along with this program. If not, see . 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 diff --git a/CanvasModel.py b/CanvasModel.py index 49f9f64..d61f00b 100755 --- a/CanvasModel.py +++ b/CanvasModel.py @@ -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: diff --git a/CanvasView.py b/CanvasView.py index 28a7d0d..e91902e 100755 --- a/CanvasView.py +++ b/CanvasView.py @@ -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): diff --git a/PoPiPaint.py b/PoPiPaint.py index 090126f..683f2a1 100755 --- a/PoPiPaint.py +++ b/PoPiPaint.py @@ -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!