1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: Update for wxPython 3.0
Should retain compatibility with 2.8.
Author: Olly Betts <olly@survex.com>
Bug-Debian: https://bugs.debian.org/759046
Forwarded: no
Last-Update: 2014-09-12
Index: python-wxmpl-2.0.0/demos/plotting.py
===================================================================
--- python-wxmpl-2.0.0.orig/demos/plotting.py
+++ python-wxmpl-2.0.0/demos/plotting.py
@@ -337,7 +337,7 @@ class TestFrame(wx.Frame):
def main():
- app = wx.PySimpleApp()
+ app = wx.App(False)
frame = TestFrame(None, -1, 'WxMpl Demos')
frame.Show(True)
app.MainLoop()
Index: python-wxmpl-2.0.0/lib/wxmpl.py
===================================================================
--- python-wxmpl-2.0.0.orig/lib/wxmpl.py
+++ python-wxmpl-2.0.0/lib/wxmpl.py
@@ -1124,7 +1124,7 @@ class PlotPanel(FigureCanvasWxAgg):
# find the toplevel parent window and register an activation event
# handler that is keyed to the id of this PlotPanel
topwin = toplevel_parent_of_window(self)
- topwin.Connect(-1, self.GetId(), wx.wxEVT_ACTIVATE, self.OnActivate)
+ topwin.Connect(self.GetId(), -1, wx.wxEVT_ACTIVATE, self.OnActivate)
wx.EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
wx.EVT_WINDOW_DESTROY(self, self.OnDestroy)
@@ -1422,7 +1422,7 @@ class PlotFrame(wx.Frame):
fileName = wx.FileSelector('Save Plot', default_extension='png',
wildcard=('Portable Network Graphics (*.png)|*.png|'
+ 'Encapsulated Postscript (*.eps)|*.eps|All files (*.*)|*.*'),
- parent=self, flags=wx.SAVE|wx.OVERWRITE_PROMPT)
+ parent=self, flags=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT)
if not fileName:
return
|