Hi Olly, hi Daniel!

Upstream speaking here. o/

* Olly Betts <o...@survex.com>, 2014-08-23, 19:22:
To assist updating to wxPython 3.0, I've put together a script which will help make the mechanical changes required. This is in a git repo on collab-maint along with a README about using it and updating packages for wxPython 3.0 in general:

http://anonscm.debian.org/cgit/collab-maint/wx-migration-tools.git

Daniel, who maintains djvusmooth in Debian, sent me a patch, which I presume is mostly the result of running your tool. Here's my review of the patch:

-WX_VERSIONS = ('2.8-unicode', '2.6-unicode')
+WX_VERSIONS = ('3.0-unicode', '2.8-unicode', '2.6-unicode')
DDJVU_API_MIN_VERSION = 26
PYTHON_DJVULIBRE_MIN_VERSION = (0, 1, 4)

@@ -55,7 +55,7 @@ def _check_wx():
    except ImportError, ex:
        raise ImportError('%s; perhaps wxPython is not installed' % (ex,))
    if not wxversion.checkInstalled(WX_VERSIONS):
-        raise ImportError('wxPython 2.6 or 2.8 with Unicode support is 
required')
+        raise ImportError('wxPython 2.6, 2.8 or 3.0 with Unicode support is 
required')
    wxversion.select(WX_VERSIONS)

This looks good in principle, but when I had both 2.8 and 3.0 installed, the former was selected... Perhaps it's a bug in wxversions?

-            style=wx.OPEN,
+            style=wx.FD_OPEN,

This is fine, although not strictly necessary, and it breaks compatibility with wxPython2.6. Though perhaps I should drop support for 2.6 anyway, as I hadn't tested it for years.

-        return wx.Color(*self._FRAME_COLORS[self._node.type])
+        return wx.Colour(*self._FRAME_COLORS[self._node.type])

Looks good[0].

-        self.SetBestFittingSize(size)
+        self.SetInitialSize(size)

OK, although again not compatible with wxPython 2.6.


Alas, after applying this patch djvusmooth doesn't work well with wxPython 3.0. I spotted two problems:

* The PageUp and PageDown cannot be used for switching between pages. I partially fixed it by using wx.Notebooks instead of wx.Choicebook[1]. But the keys still don't work when the focus is on a TreeCtrl widget.

* Editing items in TreeCtrl widgets doesn't work.

If you have ideas how to fix any of these problems, I'm all ears. :-) Unfortunately, I won't have much time to debug them myself.


[0] https://bitbucket.org/jwilk/djvusmooth/commits/6575edac0581
[1] https://bitbucket.org/jwilk/djvusmooth/commits/8bc25bf5b639

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to