Control: tags 758951 + patch

Attached is a patch for wxwidgets3.0 support.  The UI seems to function,
though I don't know anyone using torchat to actually test chatting, so
it would be good if someone who actually uses the package could give it
a more thorough test.

Let me know if you'd like me to NMU these changes.

Cheers,
    Olly
diff -Nru torchat-0.9.9.553/debian/changelog torchat-0.9.9.553/debian/changelog
--- torchat-0.9.9.553/debian/changelog	2013-01-14 00:53:06.000000000 -0300
+++ torchat-0.9.9.553/debian/changelog	2014-09-03 00:09:43.000000000 -0300
@@ -1,3 +1,11 @@
+torchat (0.9.9.553-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update for wxwidgets3.0 (Closes: #758951):
+    - New patch: wxwidgets3.0.patch
+
+ -- Olly Betts <o...@survex.com>  Wed, 03 Sep 2014 03:09:41 +0000
+
 torchat (0.9.9.553-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru torchat-0.9.9.553/debian/control torchat-0.9.9.553/debian/control
--- torchat-0.9.9.553/debian/control	2013-01-14 00:52:51.000000000 -0300
+++ torchat-0.9.9.553/debian/control	2014-09-02 23:46:33.000000000 -0300
@@ -11,7 +11,7 @@
 Package: torchat
 Architecture: all
 Depends: ${python:Depends}, ${misc:Depends}, tor (>= 0.2.1.30-1), 
- python-socksipy, python-wxgtk2.8 
+ python-socksipy, python-wxgtk3.0 
 Description: decentralized instant messenger built on top of the Tor Network
  TorChat is a peer to peer instant messenger with a completely decentralized
  design, built on top of Tor's location hidden services, providing strong 
diff -Nru torchat-0.9.9.553/debian/patches/series torchat-0.9.9.553/debian/patches/series
--- torchat-0.9.9.553/debian/patches/series	2013-01-13 22:11:10.000000000 -0300
+++ torchat-0.9.9.553/debian/patches/series	2014-09-02 23:49:33.000000000 -0300
@@ -1,2 +1,3 @@
 use-system-lib-fix-versions.patch
 include-spanish-translations.patch
+wxwidgets3.0.patch
diff -Nru torchat-0.9.9.553/debian/patches/wxwidgets3.0.patch torchat-0.9.9.553/debian/patches/wxwidgets3.0.patch
--- torchat-0.9.9.553/debian/patches/wxwidgets3.0.patch	1969-12-31 21:00:00.000000000 -0300
+++ torchat-0.9.9.553/debian/patches/wxwidgets3.0.patch	2014-09-03 00:09:39.000000000 -0300
@@ -0,0 +1,100 @@
+Description: Update for wxwidgets3.0
+Author: Olly Betts <o...@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. 

Reply via email to