-
-
Notifications
You must be signed in to change notification settings - Fork 626
-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to wxPython 4.0.0 #7077
Comments
CC @feerrenrut, @LeonarddeR, @DavyKager, @ctoth, @nishimotz, @nvdaes, @derekriemer |
…vaccess#7077. One of the biggest benefits of using wxPython 4 is easier route for upgrading to Python 3.x. Due to changes made in wxPython 4, NvDA source code (at least wx routines) must be modified. This provides some foundations, namely wx.adv.TaskbarIcon and replacing wx.SpinCtrlNameStr with a string literal.
…xtCtrl.write. re nvaccess#7077. wx.TextCtrl.write is no more - wx.TextCtrl.WriteText should be used instead.
…rsor tracking. re nvaccess#7077. If wx.TextCtrl.WriteText is used and if the cursor is located at the top of the output window for the console, newly typed text will be inserted instead of being appended, thus wx.TextCtrl.AppendText will be used.
…nter instead. re nvaccess#7077. Somehow, documentation says wx.CENTRE_ON_SCREEN is included but it isn't there at runtime. Instead, wx.Center is used (does not follow variable naming convention though), so using it for now.
…anymore, replaced with wx.FONTFAMILY_DEFAULT. re nvaccess#7077
Do either of these impact on whether the end code will run on XP?
Well somebody had to ask and as I was here....
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
----- Original Message -----
From: "Joseph Lee" <notifications@github.com>
To: "nvaccess/nvda" <nvda@noreply.github.com>
Cc: "Subscribed" <subscribed@noreply.github.com>
…Sent: Sunday, April 16, 2017 4:27 AM
Subject: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
Hi,
Robin Dunn announced on April 15th that wxPython Phoenix will be known as
wxPython 4, and an alpha was posted to PyPI. In addition to providing an
easier way for us to migrate to Python 3.x, it modernizes wxPython code.
Python Package Index link: https://pypi.python.org/pypi/wxPython/4.0.0a1
Speaking of wxPython phoenix and NVDA: I worked on porting NVDA source
code to Phoenix last year under the project name of "Heliopolis". Due to
huge GUI improvements introduced in NVDA 2016.4, current Heliopolis code
(based on 2016.2) will not work, so I'm porting from scratch.
A few things to be aware of:
* system tray icon class now lives in wx.adv package.
* The "Six" compatibility layer must be included.
* wx.SpinCtrlNameStr is no longer in use, so I replaced the relevant code
with a string literal.
* wx.CenterOnScreen is unavailable.
So far:
* Copying wxPython 4 files to misc dependencies and compiling NVDA works.
* Initialization works.
* Log viewer is working, although you may get an error that says,
"wx.Yield called recursively".
* You cannot press ENTER after you type code in Python Console.
* When you exit a settings dialog and attempt to open another, NVDA will
say that another settings dialog is open, likely having to do with
instance tracking.
Thanks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#7077
|
Hi, yes, the resulting code will run on XP, as wxPython 4.0.0 still includes support for Python 2.7. Thanks.
From: Brian1Gaff [mailto:notifications@github.com]
Sent: Sunday, April 16, 2017 2:42 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
Do either of these impact on whether the end code will run on XP?
Well somebody had to ask and as I was here....
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
----- Original Message -----
From: "Joseph Lee" <notifications@github.com>
To: "nvaccess/nvda" <nvda@noreply.github.com>
Cc: "Subscribed" <subscribed@noreply.github.com>
Sent: Sunday, April 16, 2017 4:27 AM
Subject: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
Hi,
Robin Dunn announced on April 15th that wxPython Phoenix will be known as
wxPython 4, and an alpha was posted to PyPI. In addition to providing an
easier way for us to migrate to Python 3.x, it modernizes wxPython code.
Python Package Index link: https://pypi.python.org/pypi/wxPython/4.0.0a1
Speaking of wxPython phoenix and NVDA: I worked on porting NVDA source
code to Phoenix last year under the project name of "Heliopolis". Due to
huge GUI improvements introduced in NVDA 2016.4, current Heliopolis code
(based on 2016.2) will not work, so I'm porting from scratch.
A few things to be aware of:
* system tray icon class now lives in wx.adv package.
* The "Six" compatibility layer must be included.
* wx.SpinCtrlNameStr is no longer in use, so I replaced the relevant code
with a string literal.
* wx.CenterOnScreen is unavailable.
So far:
* Copying wxPython 4 files to misc dependencies and compiling NVDA works.
* Initialization works.
* Log viewer is working, although you may get an error that says,
"wx.Yield called recursively".
* You cannot press ENTER after you type code in Python Console.
* When you exit a settings dialog and attempt to open another, NVDA will
say that another settings dialog is open, likely having to do with
instance tracking.
Thanks.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#7077
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7077 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkM3NYMj6yz_5YbOEodnP4-8_-xGNks5rweJngaJpZM4M-hxN> .
|
…r. re nvaccess#7077. In wxPython 4, when instantiating wx.GridSizer, horizontal and vertical gaps in pixels must be specified.
…fore the dialog is destroyed. re nvaccess#7077. Due to changes to how dialog sizes are constructed, keyword arguments cannot be used. Also, if Window.Destroy is called, somehow text controls and what not are gone, so save speech viewer position before destroying the window.
… sure to check if the treeview is alive. re nvaccess#7077. Somehow, when Cancel button is licked, treeview is removed first, yet item selection event is run. Make sure to catch this.
I have tried scons source and source\nvda.pyw, then got an error as follows:
|
Hi, That’s because you need to manually add wxPython 4 source in misc-deps structure and add six compatibility layer module. Some modules have moved around, certain things were added while others were removed and so on. The last two commits are really workarounds for a behavior in wxPython 4 where if you destroy a window, whatever’s inside will be gone first (particularly the last commit on input gestures dialog). Thanks.
From: Takuya Nishimoto [mailto:notifications@github.com]
Sent: Sunday, April 16, 2017 3:37 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Author <author@noreply.github.com>
Subject: Re: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
I have tried scons source and source\nvda.pyw, then got an error as follows:
INFO - __main__ (19:33:43):
Starting NVDA
INFO - core.main (19:33:44):
Config dir: C:\work\nvda\wxPy4\source\userConfig
INFO - config.ConfigManager._loadConfig (19:33:44):
Loading config: .\userConfig\nvda.ini
INFO - core.main (19:33:45):
NVDA version source-wxPy4-8f21e03
INFO - core.main (19:33:45):
Using Windows version 6.2.9200 workstation
INFO - core.main (19:33:45):
Using Python version 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
INFO - core.main (19:33:45):
Using comtypes version 0.6.2
CRITICAL - __main__ (19:33:46):
core failure
Traceback (most recent call last):
File "nvda.pyw", line 195, in <module>
core.main()
File "core.py", line 200, in main
import appModuleHandler
File "appModuleHandler.py", line 27, in <module>
import NVDAHelper
File "NVDAHelper.py", line 12, in <module>
import eventHandler
File "eventHandler.py", line 9, in <module>
import api
File "api.py", line 11, in <module>
import review
File "review.py", line 9, in <module>
from NVDAObjects import NVDAObject
File "NVDAObjects\__init__.py", line 24, in <module>
import treeInterceptorHandler
File "treeInterceptorHandler.py", line 13, in <module>
import braille
File "braille.py", line 16, in <module>
import keyboardHandler
File "keyboardHandler.py", line 20, in <module>
import ui
File "ui.py", line 18, in <module>
import gui
File "gui\__init__.py", line 16, in <module>
import wx.adv
ImportError: No module named adv
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7077 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkNriZw2HMRSd60Mno3ZXt7NULYduks5rwe89gaJpZM4M-hxN> .
|
Thank you for suggestion. |
Hi, Front-end (GUI) is working as advertised. The only anoyance is wx.Yield issue. For now, if you'd like to give it a go, please test it from source (I'll generate a try build that I'll host for a while). For add-ons: anything that deals with wx.PyDeadObjectError must be rewritten to catch RuntimeError. So far, Remote add-on version 2 fails to load due to missing function in wxPython 4. I'll hold off on sending a pull request until wxPython 4 enters beta testing phase. Thanks. |
Hi, Follow-up: there might be code changes during the alpha and beta cycle, so don't assume that my readme commit is the final one. I'll refresh the test builds once more wxPython 4 alphas and betas are posted. Thanks. |
@josephsl remember to hook the new build into miscdeps
…On Sun, Apr 16, 2017 at 12:49 PM, Joseph Lee ***@***.***> wrote:
Hi,
Follow-up: there might be code changes during the alpha and beta cycle, so
don't assume that my readme commit is the final one. I'll refresh the test
builds once more wxPython 4 alphas and betas are posted.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7077 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFGivdliEp36Go52vTUyklAulo8o0GCBks5rwmKxgaJpZM4M-hxN>
.
--
Derek Riemer: Improving the world one byte at a time!
- University of Colorado Boulder Department of computer science, 4th
year undergraduate student.
- Accessibility enthusiast.
- Proud user of the NVDA screen reader.
- Open source enthusiast.
- Skier.
Personal website <http://derekriemer.com>
|
Unfortunately, we're probably going to need to build this ourselves (just like we did for wxPython 3) so we get debug symbols unless they distribute pdb files for these new builds somewhere.
|
Hi, not forgotten – it’s up to @jcsteh to decide on that, as my job at this point is to prepare the NVDA Core itself, and misc dependencies are taken care of by NV Access. Thanks.
From: Derek Riemer [mailto:notifications@github.com]
Sent: Sunday, April 16, 2017 6:41 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
@josephsl remember to hook the new build into miscdeps
…On Sun, Apr 16, 2017 at 12:49 PM, Joseph Lee ***@***.***> wrote:
Hi,
Follow-up: there might be code changes during the alpha and beta cycle, so
don't assume that my readme commit is the final one. I'll refresh the test
builds once more wxPython 4 alphas and betas are posted.
Thanks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7077 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFGivdliEp36Go52vTUyklAulo8o0GCBks5rwmKxgaJpZM4M-hxN>
.
--
Derek Riemer: Improving the world one byte at a time!
- University of Colorado Boulder Department of computer science, 4th
year undergraduate student.
- Accessibility enthusiast.
- Proud user of the NVDA screen reader.
- Open source enthusiast.
- Skier.
Personal website <http://derekriemer.com>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7077 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkG51wqpTV1qCYl0ANTjuTWV4fod-ks5rwsM7gaJpZM4M-hxN> .
|
…t issues when installing more than one add-on remotely. re nvaccess#7077. Here 'remotely' refers to letting people install add-ons via Windows Explorer and other means. Without nullifying instance flag when the add-ons manager closes, instance flag will be kept, which causes wxPython to think (and correctly) that the dialog is still active, resulting in runtime error on add-on list control being thrown.
P2 because being able to move to Python 3 is important for many reasons and upgrading wxPython is required for that. Also, we want to discover any major issues now so we can hopefully get them addressed before wxPython 4 goes final. @josephsl, how is this work going? Are there any major broken bits you've discovered since your original comment? |
When do you see this error in Log Viewer? Is there something specific you do to reproduce this?
What happens if you do?
That suggests |
P2 because being able to move to Python 3 is important for many
reasons and upgrading wxPython is required for that. Also, we want to
discover any major issues now so we can hopefully get them addressed
before wxPython 4 goes final.
We should probably also update the Addon template to be Python 2 and 3
compatible then, and recommend writing in the dialect of Python which
works for both 2 and 3.
Is there a general Python 3 upgrade issue which we can use with Github's
checklist feature for keeping track of all the bits of the migration?
|
Agree we eventually need to do both of those things, but wxPython has priority because it's actively being worked on now and because we have a chance to get any major issues addressed early. We don't have the cycles to deal with other Python 3 stuff at the moment. To answer your question, there's no meta issue for Py3 as far as I know. |
Hi, Wx.Yield: to reproduce this, try navigating through a long text by pressing arrow keys quickly. Other issues, such as inability to enter chars into Python Console were fixed in subsequent commits. I’ll send a PR tonight. Thanks.
From: James Teh [mailto:notifications@github.com]
Sent: Tuesday, April 25, 2017 4:37 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
P2 because being able to move to Python 3 is important for many reasons and upgrading wxPython is required for that. Also, we want to discover any major issues now so we can hopefully get them addressed before wxPython 4 goes final.
@josephsl <https://github.com/josephsl> , how is this work going? Are there any major broken bits you've discovered since your original comment?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7077 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkCOMvXGlZqf-H1ktFcpkbOPV2myJks5rzoOkgaJpZM4M-hxN> .
|
…cess#7077. Just like add-ons manager, if the instance flag for config profiles dialog isn't nullified, wxWidgets will think that the dialog is active when it is gone. Thus nullify it in two places: when the actual dialog closes and when a new profile is activated right away (for the latter, it is parent.Destroy).
Hi, Adding #7105 for reference purposes, as this issue must be done before moving onto that issue fully. Thanks. |
Before we can move to Python 3 (nvaccess#7105), two important dependencies must be satisfied: wxPython 4 (nvaccess#7077) and SCons (nvaccess#7520). As of September 18, 2017, both were satisfied, although wxPython 4 is still in beta testing phase. For now, upgrade SCons to 3.0.0, which supports Python 2.7, 3.5, and 3.6. Key changes include changing print statements to print function and no more Environment.gettextMoFile attribute unless it has changed somehow. Upgrading to SCons 3 is one of the prerequisites to transitioning to Python 3.x.
Due to request from a tester, wxPython 4 developer has decided to restore wx.TextCtrl.write. This means the AppendText workaround in place is no longer needed.
…WXK_pAGEUP and wx.WXK_PAGEDOWN, respectively. re nvaccess#7077. wx.WXK_PRIOR and wx.WXK_NEXT are no more, replaced by direct definition of page up and page down keys. This fixes the problem where sliders couldn't be changed in Voice Settings dialog.
Hi, wxPy 4 is officially out, so I'd like to request the PR associated with this issue to be reviewed. Thanks. |
Assuming it hasn't been fixed already, a solution needs to be found to the wx timer re-entry problem before we can consider upgrading. NVDA relies on timers not being re-entrant (which is true in wxPython 3), but in wxPy 4, they are re-entrant. As discussed in this wxPython mailing list thread, this will not be changed; we were relying on undefined behaviour, probably even a bug in wxPython 3. Anyway, aside from the Yield assertion, this could also cause problems in dialog modal loops. We rely on this for the core pump (search for the word "re-entrant" in core.py), but also for updateCheck's progress dialog; see 6d31167. The simplest way to fix this is probably to subclass the wx timer to prevent re-entry, then use that subclass wherever we depend on this. This is all in the same thread, so that shouldn't be too hard: just set a boolean while the callback is running and clear it when it returns. If the boolean is set, don't run the callback, since the timer is already running the callback. |
@josephsl commented on Apr 27, 2017, 5:44 PM GMT+10:
That makes sense, but it's ultimately just hiding the underlying problem. I would recommend reverting that change; the assertion is indicative of a real problem here. See my previous comment for details on the correct way to fix this. |
Hi, After taking a look at the thread and searching, I came to the conclusion that I may not be the right person for GUI back-end, as I really don't have a clue as to how to proceed with this. Also, due to other commitments (and also taking care of health and school), I'd like to invite the community to help out here ASAP (as in within the next few days), as we need to get this going very soon, otherwise we'll lose opportunity to implement #7105 and beyond. Also, I'd like to request a special permission from NV Access to pause all our work while incubating wxPython 4 (a separate issue). Thanks. |
@josephsl commented on 2 Feb 2018, 02:37 CET:
It is not entirely clear to me what you're requesting here. What work should be paused? |
Hi, I would imagine GUI work for the most part. Thanks.
From: Leonard de Ruijter [mailto:notifications@github.com]
Sent: Saturday, February 3, 2018 6:11 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Joseph Lee <joseph.lee22590@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [nvaccess/nvda] Upgrade to wxPython 4.0.0 (#7077)
<https://github.com/josephsl> @josephsl commented on 2 Feb 2018, 02:37 CET <#7077 (comment)> :
Also, I'd like to request a special permission from NV Access to pause all our work while incubating wxPython 4 (a separate issue).
It is not entirely clear to me what you're requesting here. What work should be paused?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7077 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkEn0YbN_Wz-aNTXpneHq2rTdCUUVks5tRGkEgaJpZM4M-hxN> .
|
…gone. Re nvaccess#7077. Previously, when closing settings dialog, instances would be cleared. It turns out that might not be the case with wxPython 4, so manually clear instances set if the only thing remaining is the SettingsDialog object.
…igation about circular references. Re nvaccess#7077.
…vaccess#7077. Somehow, using wx.ID_ANY for speech dictionary buttons causes the buttons to not work. This is because the button is added directly to the helper sizer. Thus use NewID instead.
…RITE_PROMPT. Re nvaccess#7077. Yet another change of attribute names: wx.SAVE is now wx.FD_SAVE, wx.OVERWRITE_PROMPT is fwx.FD_OVERWRITE_PROMPT. This resolves an issue where Log Viewer does not let users save logs (issue nvaccess#8385).
…ion for this checkbox just like others. re nvaccess#7077. Somehow, for touch interaction/touch typing mode checkbox, wx.NewId function was called, whereas other checkboxes do not do this. Thus make it consistent with other fellows by not calling this function in this particular checkbox.
… panels. Re nvaccess#7077. Reported by several people and subsequently confirmed: in wxPython 4.0.0 to 4.0.2, there exists a wrap-around bug in wx.NewId function that prevents programs calling this function from working normally after the ID's are exhausted. This is now fixed in wxPython 4.0.3 via wx.NewIdRef function. Thus use this function to keep an eye on panel ID's, used for announcing new categories as they become visible in multi-category NVDA Settings screen.
* wxPython4: initial foundations with wx.adv.TaskbarIcon and others. re #7077. One of the biggest benefits of using wxPython 4 is easier route for upgrading to Python 3.x. Due to changes made in wxPython 4, NvDA source code (at least wx routines) must be modified. This provides some foundations, namely wx.adv.TaskbarIcon and replacing wx.SpinCtrlNameStr with a string literal. * wxPython 4/Python Console: use wx.TextCtrl.WriteText instead of wx.TextCtrl.write. re #7077. wx.TextCtrl.write is no more - wx.TextCtrl.WriteText should be used instead. * wxPython 4/Python Console: use AppendText instead of WriteText for cursor tracking. re #7077. If wx.TextCtrl.WriteText is used and if the cursor is located at the top of the output window for the console, newly typed text will be inserted instead of being appended, thus wx.TextCtrl.AppendText will be used. * wxPython 4/various dialogs: wx.CENTER_ON_SCREEN is no more, use wx.Center instead. re #7077. Somehow, documentation says wx.CENTRE_ON_SCREEN is included but it isn't there at runtime. Instead, wx.Center is used (does not follow variable naming convention though), so using it for now. * wxPython 4/Welcome dialog: wx.NORMAL cannot be used as a font family anymore, replaced with wx.FONTFAMILY_DEFAULT. re #7077 * wxPython 4/cursor manager/Find dialog: use sizer.Add instead of sizer.AddSizer. re #7077. * wxPython 4/Launcher: spell out GridSizer gaps, prevents overload error. re #7077. In wxPython 4, when instantiating wx.GridSizer, horizontal and vertical gaps in pixels must be specified. * wxPython 4/speech viewer: few tweaks to constructor, save position before the dialog is destroyed. re #7077. Due to changes to how dialog sizes are constructed, keyword arguments cannot be used. Also, if Window.Destroy is called, somehow text controls and what not are gone, so save speech viewer position before destroying the window. * wxPython 4/Input gestures dialog: when Cancel button is clicked, make sure to check if the treeview is alive. re #7077. Somehow, when Cancel button is licked, treeview is removed first, yet item selection event is run. Make sure to catch this. * Readme: mention new wxPython and Six compatibility layer requirements. re #7077 * wx.Menu: AppendMenu is deprecated, use Append instead. re #7077 * Add-ons Manager: make sure to nullify dialog instance flag and prevent issues when installing more than one add-on remotely. re #7077. Here 'remotely' refers to letting people install add-ons via Windows Explorer and other means. Without nullifying instance flag when the add-ons manager closes, instance flag will be kept, which causes wxPython to think (and correctly) that the dialog is still active, resulting in runtime error on add-on list control being thrown. * gui/Config profiles dialog/wxPython 4: nullify instance flag. re #7077. Just like add-ons manager, if the instance flag for config profiles dialog isn't nullified, wxWidgets will think that the dialog is active when it is gone. Thus nullify it in two places: when the actual dialog closes and when a new profile is activated right away (for the latter, it is parent.Destroy). * Python console: revert to wx.TextCtrl.write function. re #7077. Due to request from a tester, wxPython 4 developer has decided to restore wx.TextCtrl.write. This means the AppendText workaround in place is no longer needed. * Settings/voice sliders: replace wx.WXK_PRIOR and wx.WXK_NEXT with wx.WXK_pAGEUP and wx.WXK_PAGEDOWN, respectively. re #7077. wx.WXK_PRIOR and wx.WXK_NEXT are no more, replaced by direct definition of page up and page down keys. This fixes the problem where sliders couldn't be changed in Voice Settings dialog. * core.CorePump: block this timer from firing recursively. This could never happen before wxPython 4, but now it is possible. * miscDeps now contains wxPython 4. * Core: update copyright years, corrected issue number * Comment spelling fix * wxPython 4.0.1 in miscDeps * gui: add a NonRe-entrant timer to replace use of wx.Timer and wx.PyTimer. * Replace usage of wx.PyTimer with gui.NonReentrantTimer for all core code in NVDA. This does not change any braille display drivers. * Clarify comment * Clarify docstring * Spelling * Readme: mention wxPython 4.0.1 * wxPython 4: use wx.ID_ANY instead of NewID function. Re #8121. Becasue NewID may raise assertion error, use wx.ID_ANY instead. * GUI/SettingsDialogs: remove extra space at ends of lines * Settings screen: wx.Center again. * add a new submodule for wxPython dep * Use `CenterOnScreen()` rather than `Center` Use the explicit function rather than `Center()` with the CENTER_ON_SCREEN constant. Also supply CENTER_ON_SCREEN for addons which may still rely on it. * Define both missing constants Despite being referred to in the documentation for wxPython, CENTER_ON_SCREEN and CENTRE_ON_SCREEN constants are missing. Here we redefine them to stop errors in addons. Addons should migrate to using the explicit functions CenterOnParent or CenterOnScreen. * Update copyright years and headers. * Settings dialog: clear instances set when all settings instances are gone. Re #7077. Previously, when closing settings dialog, instances would be cleared. It turns out that might not be the case with wxPython 4, so manually clear instances set if the only thing remaining is the SettingsDialog object. * wxPython 4: revert instances checking in SettingsDialog thanks to mitigation about circular references. Re #7077. * Dictionary dilaog: use wx.NewId for add, edit, and remove buttons. Re #7077. Somehow, using wx.ID_ANY for speech dictionary buttons causes the buttons to not work. This is because the button is added directly to the helper sizer. Thus use NewID instead. * Get rid of unnecessary ID usage * Log viewer: wx.SAVE -> wx.FD_SAVE, wx.OVERWRITE_PROMPT -> wx.FD_OVERWRITE_PROMPT. Re #7077. Yet another change of attribute names: wx.SAVE is now wx.FD_SAVE, wx.OVERWRITE_PROMPT is fwx.FD_OVERWRITE_PROMPT. This resolves an issue where Log Viewer does not let users save logs (issue #8385). * Log viewer: add copyright headers. * wxPython4/settings dialogs: deleteWindows -> delete_windows in sizer.Clear method. Re #7077 * What's new: add wxPython 4.0.1 entry in changes for developers section. Re #7077 * Upgrade to wxPython 4.0.3 * Touch intewraction/touch typing mode checkbox: no more wx.NewId function for this checkbox just like others. re #7077. Somehow, for touch interaction/touch typing mode checkbox, wx.NewId function was called, whereas other checkboxes do not do this. Thus make it consistent with other fellows by not calling this function in this particular checkbox. * Settings panels: use wx.NewIdRef function to retrieve global ID's for panels. Re #7077. Reported by several people and subsequently confirmed: in wxPython 4.0.0 to 4.0.2, there exists a wrap-around bug in wx.NewId function that prevents programs calling this function from working normally after the ID's are exhausted. This is now fixed in wxPython 4.0.3 via wx.NewIdRef function. Thus use this function to keep an eye on panel ID's, used for announcing new categories as they become visible in multi-category NVDA Settings screen. * Readme: mention Python 2.7.15 and wxPython 4.0.3 dependencies. * What's new: wxPython 4.0.1 -> 4.0.3. Re #7077.
Hi,
Robin Dunn announced on April 15th that wxPython Phoenix will be known as wxPython 4, and an alpha was posted to PyPI. In addition to providing an easier way for us to migrate to Python 3.x, it modernizes wxPython code.
Python Package Index link: https://pypi.python.org/pypi/wxPython/4.0.0a1
Speaking of wxPython phoenix and NVDA: I worked on porting NVDA source code to Phoenix last year under the project name of "Heliopolis". Due to huge GUI improvements introduced in NVDA 2016.4, current Heliopolis code (based on 2016.2) will not work, so I'm porting from scratch.
A few things to be aware of:
So far:
Thanks.
The text was updated successfully, but these errors were encountered: