You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was trying to implement some code for a proposal of a UX bug fix.
It would have been convenient to use a dialog containing "Cancel" and "Continue" buttons.
If I was to do that in an add-on, it would be straight forward:
Call wx.messageDialog, with the wx.OK | wx.CANCEL flags, in a context handler.
Then call .SetOKLabel("&Continue") on the context handler instance.
However, because of a freeze issue which occurs when a dialog and an NVDA settings dialog are open at the same time, gui.messageBox was created to run a locking scheme to prevent more than one dialog, and its docstring says not to use wx.MessageDialog.
Describe the solution you'd like
In #12344, I suggested modifying gui.messageBox to use wx.MessageDialog. I made a test build doing this, and changed a dialog by restyling its buttons.
Everything worked fine, and I could not cause any failures from it.
However if there is concern about making a change wholesale like that, I will suggest as an alternative:
Creating a gui.messageDialog function.
It can call wx.MessageDialog, but wrapped in the same protections that gui.messageBox uses.
It can then offer the styling, extended messages, and so on, that wx.MessageDialog offers, but only be used when developers find its use appropriate to the situation.
All calls to gui.messageBox can then continue unaffected.
This reverts commit 2477780.
Reverts #17304
Issues fixed
Fixes#17560Fixes#17553
Issues reopened
Reopens #13007
Reopens #12344
Reopens #12353
Reason for revert
This PR broke two important NVDA functions, and there is insufficient time before the Christmas/New Years break to fix the issues, so we are temporarily reverting so that alphas work over the break:
• The CRFT no longer works, as gui.message.MessageDialog's inheritance from ContextHelpMixin was accidentally removed.
• Update checking no longer works, as runScriptModalDialog was modified to increment and decrement _messageBoxCounter, but UpdateAskInstallDialog attempts to restart NVDA before it has been closed, so the update fails as NVDA appears to be in an unsafe state.
Alternate proposal to #12344
Is your feature request related to a problem? Please describe.
I was trying to implement some code for a proposal of a UX bug fix.
It would have been convenient to use a dialog containing "Cancel" and "Continue" buttons.
If I was to do that in an add-on, it would be straight forward:
wx.messageDialog
, with thewx.OK | wx.CANCEL
flags, in a context handler..SetOKLabel("&Continue")
on the context handler instance.However, because of a freeze issue which occurs when a dialog and an NVDA settings dialog are open at the same time, gui.messageBox was created to run a locking scheme to prevent more than one dialog, and its docstring says not to use wx.MessageDialog.
Describe the solution you'd like
In #12344, I suggested modifying gui.messageBox to use wx.MessageDialog. I made a test build doing this, and changed a dialog by restyling its buttons.
Everything worked fine, and I could not cause any failures from it.
However if there is concern about making a change wholesale like that, I will suggest as an alternative:
Creating a gui.messageDialog function.
It can call wx.MessageDialog, but wrapped in the same protections that gui.messageBox uses.
It can then offer the styling, extended messages, and so on, that wx.MessageDialog offers, but only be used when developers find its use appropriate to the situation.
All calls to gui.messageBox can then continue unaffected.
Describe alternatives you've considered
See #12344
Additional context
The text was updated successfully, but these errors were encountered: