Skip to content
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

remove wx.CENTER_ON_SCREEN and wx.CENTRE_ON_SCREEN #12309

merged 3 commits into from Apr 20, 2021


Copy link

Link to issue number:


Summary of the issue:

We included code to add backwards compatibility for addons for the following deprecated wxPython constants wx.CENTER_ON_SCREEN = wx.CENTRE_ON_SCREEN when used with Dialog.Center()

Description of how this pull request fixes the issue:

Remove the deprecated code, and it's only usage in AskAllowUsageStatsDialog, replace with self.CentreOnScreen()

Testing strategy:

Search code for usages of CENTRE_ON_SCREEN and CENTER_ON_SCREEN

Ensure the following dialog centres properly in the NVDA python console

from gui.startupDialogs import AskAllowUsageStatsDialog

Known issues with pull request:


Change log entry:

Developer changes

- `wx.CENTRE_ON_SCREEN` and `wx.CENTER_ON_SCREEN` is deprecated, use `self.CentreOnScreen()` instead. 

Code Review Checklist:

This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review and confirm you have considered the following items.
Mark items you have considered by checking them.
You can do this when editing the Pull request description with an x: [ ] becomes [x].
You can also check the checkboxes after the PR is created.

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual tests.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.

@seanbudd seanbudd added the deprecated/2021.1 Label used to track deprecations due for removal in the 2021.1 release label Apr 19, 2021
@seanbudd seanbudd self-assigned this Apr 19, 2021
@seanbudd seanbudd added this to the 2021.1 milestone Apr 19, 2021
Copy link

Could you please change the title of this pr to reflect that this removes deprecated constants, rather than deprecating them. Currently the title is "deprecate wx.CENTER_ON_SCREEN and wx.CENTRE_ON_SCREEN" which is not quite true.

@seanbudd seanbudd changed the title deprecate wx.CENTER_ON_SCREEN and wx.CENTRE_ON_SCREEN remove wx.CENTER_ON_SCREEN and wx.CENTRE_ON_SCREEN Apr 20, 2021
@seanbudd seanbudd merged commit 240f641 into master Apr 20, 2021
@seanbudd seanbudd deleted the dep-center_on_screen branch April 20, 2021 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
deprecated/2021.1 Label used to track deprecations due for removal in the 2021.1 release
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants