--- Begin Message ---
Package: whyteboard
Version: 0.41.1-4.1
Severity: important
Tags: patch sid jessie
User: freewx-ma...@lists.alioth.debian.org
Usertags: wxpy3.0
Control: block 755757 by -1
We're aiming to migrate the archive to using wxpython3.0 instead of
wxwidgets2.8, and hope to drop wxwidgets2.8 before jessie is released.
I've rebuilt whyteboard with the attached patch, which updates the code
to make it compatible with wxPython 3.0, and comments out the
"import wx.media" (as discussed in #725711).
With these changes, whyteboard runs OK, and I can exercise the menus,
etc. I'm not familiar with the application, so it would be good if
someone who actually uses it did some more thorough testing.
I'm happy to NMU these changes.
Cheers,
Olly
diff -Nru whyteboard-0.41.1/debian/changelog whyteboard-0.41.1/debian/changelog
--- whyteboard-0.41.1/debian/changelog 2011-08-17 03:22:12.000000000 +1200
+++ whyteboard-0.41.1/debian/changelog 2014-08-15 23:04:25.000000000 +1200
@@ -1,3 +1,13 @@
+whyteboard (0.41.1-4.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Update to depend on python-wxgtk3.0 rather than python-wxgtk2.8.
+ + New patch: 01_wxpy3.0-compat.patch
+ * Disable "import wx.media" (Closes: #725711):
+ + New patch: 02_wxmedia_disable.patch
+
+ -- Olly Betts <o...@survex.com> Fri, 15 Aug 2014 23:02:51 +1200
+
whyteboard (0.41.1-4) unstable; urgency=low
* Add python-setuptools to Build-Depends. (Closes: #634411)
diff -Nru whyteboard-0.41.1/debian/control whyteboard-0.41.1/debian/control
--- whyteboard-0.41.1/debian/control 2011-08-17 03:15:08.000000000 +1200
+++ whyteboard-0.41.1/debian/control 2014-08-08 00:55:05.000000000 +1200
@@ -12,7 +12,7 @@
Package: whyteboard
Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, python-wxgtk2.8
+Depends: ${python:Depends}, ${misc:Depends}, python-wxgtk3.0
Description: overlay painting and annotation application
Whyteboard is a free painting application for Linux, Windows and Mac. It is
suited towards creating visual presentations and for overlaying PDF images
diff -Nru whyteboard-0.41.1/debian/patches/01_wxpy3.0-compat.patch whyteboard-0.41.1/debian/patches/01_wxpy3.0-compat.patch
--- whyteboard-0.41.1/debian/patches/01_wxpy3.0-compat.patch 1970-01-01 12:00:00.000000000 +1200
+++ whyteboard-0.41.1/debian/patches/01_wxpy3.0-compat.patch 2014-08-15 23:13:07.000000000 +1200
@@ -0,0 +1,95 @@
+Description: Fix to work with wxpython3.0
+Author: Olly Betts <o...@survex.com>
+Bug-Debian: http://bugs.debian.org/725711
+Forwarded: no
+Last-Update: 2014-08-15
+
+--- whyteboard-0.41.1.orig/whyteboard/gui/frame.py
++++ whyteboard-0.41.1/whyteboard/gui/frame.py
+@@ -264,7 +264,7 @@ class GUI(wx.Frame):
+ _file = _file.replace(u":", u"-").replace(u"/", u"-")
+
+ name = file_dialog(self, _("Save Whyteboard As..."),
+- wx.SAVE | wx.OVERWRITE_PROMPT, wildcard, _dir, _file)
++ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, wildcard, _dir, _file)
+ if name:
+ if not os.path.splitext(name)[1]: # no file extension
+ name += u'.wtbd'
+@@ -290,7 +290,7 @@ class GUI(wx.Frame):
+
+ _dir = self.util.config.get('last_opened_dir') or u""
+
+- filename = file_dialog(self, _("Open file..."), wx.OPEN, wildcard, _dir)
++ filename = file_dialog(self, _("Open file..."), wx.FD_OPEN, wildcard, _dir)
+ self.open_file(filename)
+
+
+@@ -330,7 +330,7 @@ class GUI(wx.Frame):
+ if not self.util.im_location:
+ return
+ filename = file_dialog(self, _("Export data to..."),
+- wx.SAVE | wx.OVERWRITE_PROMPT, u"PDF (*.pdf)|*.pdf")
++ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, u"PDF (*.pdf)|*.pdf")
+
+ if filename:
+ ext = os.path.splitext(filename)[1]
+@@ -395,7 +395,7 @@ class GUI(wx.Frame):
+ wildcard = _("Whyteboard Preference Files") + u" (*.pref)|*.pref"
+
+ filename = file_dialog(self, _("Export preferences to..."),
+- wx.SAVE | wx.OVERWRITE_PROMPT, wildcard)
++ wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, wildcard)
+ if filename:
+ if not os.path.splitext(filename)[1]:
+ filename += u".pref"
+@@ -409,7 +409,7 @@ class GUI(wx.Frame):
+ """
+ wildcard = _("Whyteboard Preference Files") + u" (*.pref)|*.pref"
+
+- filename = file_dialog(self, _("Import Preferences From..."), wx.OPEN,
++ filename = file_dialog(self, _("Import Preferences From..."), wx.FD_OPEN,
+ wildcard, get_home_dir())
+
+ if filename:
+@@ -454,7 +454,7 @@ class GUI(wx.Frame):
+ u"BMP (*.bmp)|*.bmp|TIFF (*.tiff)|*.tiff")
+
+ dlg = wx.FileDialog(self, _("Export data to..."),
+- style=wx.SAVE | wx.OVERWRITE_PROMPT, wildcard=wildcard)
++ style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT, wildcard=wildcard)
+ if dlg.ShowModal() == wx.ID_OK:
+ filename = dlg.GetPath()
+ _name = os.path.splitext(filename)[1].replace(u".", u"")
+--- whyteboard-0.41.1.orig/whyteboard/gui/panels.py
++++ whyteboard-0.41.1/whyteboard/gui/panels.py
+@@ -485,7 +485,7 @@ class MediaPanel(wx.Panel):
+ if self.directory:
+ _dir = self.directory
+
+- name = file_dialog(self, _("Choose a media file"), wx.OPEN, wildcard, _dir)
++ name = file_dialog(self, _("Choose a media file"), wx.FD_OPEN, wildcard, _dir)
+ if name:
+ self.do_load_file(name)
+
+--- a/whyteboard/gui/panels.py
++++ b/whyteboard/gui/panels.py
+@@ -1019,7 +1019,7 @@
+ dc.SelectObject(self.buffer)
+
+ gcdc = wx.GCDC(dc)
+- gcdc.SetBrush(wx.Brush(wx.Color(0, 0, 255, 50))) # light blue
++ gcdc.SetBrush(wx.Brush(wx.Colour(0, 0, 255, 50))) # light blue
+ gcdc.SetPen(wx.Pen((0, 0, 0), 1, wx.TRANSPARENT))
+ gcdc.DrawRectangle(0, 0, 150, 150)
+
+--- a/whyteboard/tools.py
++++ b/whyteboard/tools.py
+@@ -1785,7 +1785,7 @@
+ if (not replay and self.canvas.gui.util.config['bmp_select_transparent']
+ and meta.transparent):
+ dc = wx.GCDC(dc)
+- dc.SetBrush(wx.Brush(wx.Color(0, 0, 255, 50))) # light blue
++ dc.SetBrush(wx.Brush(wx.Colour(0, 0, 255, 50))) # light blue
+ dc.SetPen(wx.Pen(self.colour, self.thickness, wx.SOLID))
+ else:
+ dc.SetPen(wx.Pen(self.colour, self.thickness, wx.SHORT_DASH))
diff -Nru whyteboard-0.41.1/debian/patches/02_wxmedia_disable.patch whyteboard-0.41.1/debian/patches/02_wxmedia_disable.patch
--- whyteboard-0.41.1/debian/patches/02_wxmedia_disable.patch 1970-01-01 12:00:00.000000000 +1200
+++ whyteboard-0.41.1/debian/patches/02_wxmedia_disable.patch 2014-08-15 23:13:09.000000000 +1200
@@ -0,0 +1,11 @@
+--- a/whyteboard/gui/panels.py
++++ b/whyteboard/gui/panels.py
+@@ -26,7 +26,7 @@
+ import os
+
+ import wx
+-import wx.media
++#import wx.media
+ import wx.lib.colourselect as csel
+
+ from wx.lib import scrolledpanel as scrolled
diff -Nru whyteboard-0.41.1/debian/patches/series whyteboard-0.41.1/debian/patches/series
--- whyteboard-0.41.1/debian/patches/series 2011-02-09 21:36:32.000000000 +1300
+++ whyteboard-0.41.1/debian/patches/series 2014-08-15 22:36:02.000000000 +1200
@@ -1 +1,3 @@
00_setup_py
+01_wxpy3.0-compat.patch
+02_wxmedia_disable.patch
--- End Message ---