Skip to content

Commit

Permalink
Handle deprecated function for _popupSettingsDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilleB79 committed Dec 19, 2023
1 parent 4759dd5 commit 476b48c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addon/globalPlugins/ndtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ def terminate(self):
category=ADDON_SUMMARY,
)
def script_openSettings(self, gesture):
try:
# For NVDA >= 2023.2
popupSettingsDialog = gui.mainFrame.popupSettingsDialog
except AttributeError:
# For NVDA <= 2023.1
popupSettingsDialog = gui.mainFrame._popupSettingsDialog
wx.CallAfter(
gui.mainFrame._popupSettingsDialog,
popupSettingsDialog,
gui.settingsDialogs.NVDASettingsDialog,
NDTTSettingsPanel,
)
Expand Down

0 comments on commit 476b48c

Please sign in to comment.