Blob Blame History Raw
Description: Fixes for wxPython 3.0
 Retains compatibility with 2.8.
Author: Olly Betts <olly@survex.com>
Bug-Debian: https://bugs.debian.org/759093
Forwarded: no
Last-Update: 2014-09-20

Index: winpdb-1.4.8/winpdb.py
===================================================================
--- winpdb-1.4.8.orig/winpdb.py
+++ winpdb-1.4.8/winpdb.py
@@ -278,7 +278,7 @@ import sys
 
 
 
-WXVER = "2.6"
+WXVER = "2.8"
 
 STR_WXPYTHON_ERROR_TITLE = 'Winpdb Error'
 STR_WXPYTHON_ERROR_MSG = """wxPython was not found.
@@ -3870,7 +3870,7 @@ class CHTMLDialog(wx.Dialog):
         self.m_html.SetPage(self.get_html_text(text))
         
         ir = self.m_html.GetInternalRepresentation()
-        self.m_html.SetSize((ir.GetWidth() + 25, min(500, ir.GetHeight() + 25)))
+        self.m_html.SetMinSize((ir.GetWidth() + 25, min(500, ir.GetHeight() + 25)))
 
         btnsizer = wx.StdDialogButtonSizer()
         sizerv.Add(btnsizer, 0, wx.ALIGN_CENTRE | wx.ALL, 5)
@@ -4465,7 +4465,7 @@ class COpenDialog(wx.Dialog):
         (_path, filename, args) = rpdb2.split_command_line_path_filename_args(command_line)
         _abs_path = os.path.abspath(_path)
 
-        dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR)
+        dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
         r = dlg.ShowModal()
         if r == wx.ID_OK:
             path = dlg.GetPaths()[0]
@@ -4563,7 +4563,7 @@ class CLaunchDialog(wx.Dialog):
 
         cwd = rpdb2.getcwdu()
             
-        dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.OPEN | wx.CHANGE_DIR)
+        dlg = wx.FileDialog(self, defaultDir = _abs_path, defaultFile = filename, wildcard = WINPDB_WILDCARD, style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
         r = dlg.ShowModal()
 
         os.chdir(cwd)