Description: Update for wxwidgets3.0
Author: Olly Betts <olly@survex.com>
Bug-Debian: https://bugs.debian.org/758951
Forwarded: no
Last-Update: 2014-09-02

Index: torchat-0.9.9.553/tc_gui.py
===================================================================
--- torchat-0.9.9.553.orig/tc_gui.py
+++ torchat-0.9.9.553/tc_gui.py
@@ -306,7 +306,7 @@ class PopupMenu(wx.Menu):
 
     def onSendFile(self, evt):
         title = lang.DFT_FILE_OPEN_TITLE % self.buddy.getAddressAndDisplayName()
-        dialog = wx.FileDialog(self.mw, title, style=wx.OPEN)
+        dialog = wx.FileDialog(self.mw, title, style=wx.FD_OPEN)
         dialog.SetDirectory(config.getHomeDir())
         if dialog.ShowModal() == wx.ID_OK:
             file_name = dialog.GetPath()
@@ -516,10 +516,10 @@ class DlgEditContact(wx.Dialog):
                 except:
                     pass
 
-        self.Close()
+        self.Destroy()
 
     def onCancel(self,evt):
-        self.Close()
+        self.Destroy()
 
 
 class DlgEditProfile(wx.Dialog):
@@ -652,7 +652,7 @@ class DlgEditProfile(wx.Dialog):
         
     def onAvatar(self, evt):
         title = lang.DEP_AVATAR_SELECT_PNG
-        dialog = wx.FileDialog(self, title, style=wx.OPEN)
+        dialog = wx.FileDialog(self, title, style=wx.FD_OPEN)
         dialog.SetWildcard("%s (*.png)|*.png|%s (*.*)|*.*" % (lang.DEP_PNG_FILES, lang.DEP_ALL_FILES))
         dialog.SetDirectory(config.getHomeDir())
         if dialog.ShowModal() == wx.ID_OK:
@@ -667,7 +667,7 @@ class DlgEditProfile(wx.Dialog):
         if os.path.exists(avatar_new):
             tc_client.wipeFile(avatar_new)
 
-        self.Close()
+        self.Destroy()
 
     def onOk(self, evt):
         config.set("profile", "name", self.txt_name.GetValue())
@@ -695,7 +695,7 @@ class DlgEditProfile(wx.Dialog):
             buddy.sendProfile()
             buddy.sendStatus()
 
-        self.Close()
+        self.Destroy()
 
 
 class BuddyList(wx.ListCtrl):
@@ -1451,7 +1451,7 @@ class ChatWindow(wx.Frame):
 
     def onSendFile(self, evt):
         title = lang.DFT_FILE_OPEN_TITLE % self.buddy.getAddressAndDisplayName()
-        dialog = wx.FileDialog(self, title, style=wx.OPEN)
+        dialog = wx.FileDialog(self, title, style=wx.FD_OPEN)
         dialog.SetDirectory(config.getHomeDir())
         if dialog.ShowModal() == wx.ID_OK:
             file_name = dialog.GetPath()
@@ -1748,11 +1748,11 @@ class FileTransferWindow(wx.Frame):
             self.transfer_object.close()
         except:
             pass
-        self.Close()
+        self.Destroy()
 
     def onSave(self, evt):
         title = lang.DFT_FILE_SAVE_TITLE % self.buddy.getAddressAndDisplayName()
-        dialog = wx.FileDialog(self, title, defaultFile=self.file_name, style=wx.SAVE)
+        dialog = wx.FileDialog(self, title, defaultFile=self.file_name, style=wx.FD_SAVE)
         if config.isPortable():
             dialog.SetDirectory(config.getDataDir())
         else:
Index: torchat-0.9.9.553/torchat.py
===================================================================
--- torchat-0.9.9.553.orig/torchat.py
+++ torchat-0.9.9.553/torchat.py
@@ -26,10 +26,10 @@ if config.isMac():
         
 else:
     try:
-        if wxversion.checkInstalled('2.8'):
-            wxversion.select('2.8') # On MSW and GTK we stick with 2.8 for now
+        if wxversion.checkInstalled('3.0'):
+            wxversion.select('3.0')
         else:
-            print "(1) wxPython-2.8 is not installed"
+            print "(1) wxPython-3.0 is not installed"
         
     except:
         # continue anyways. 
