Message Dialog API take 2 #17582
Working refactored message dialog based on extant message dialog and …
dfdd299a
Improve positioning
38c99cb2
Explicitly focus default item
07ba293b
Improved types and type hints
a479a4f0
Switched to setLabelText to avoid mnemonic issue
3326a983
Switched to icon bundles
1a8f82f1
Renamed private methods to be dunder
99dd6051
Some manual test cases
2a3df490
Added check for default item before focusing
947f669a
Minor changes to make temp code work better
6bd8c8a0
Implementation of addButton, addOkButton and addCancelButton
2e255cba
Return self for chaining, and add a option to set as default
ce826f25
Added close functionality
9a7dbf87
Fixed layout issues and updated test case
768e0520
Added post popup call
7e6754f0
Added infrastructure for updates to API not yet implemented
601a193f
Merge branch 'master' into messageDialogApi
64801d96
Swiutch to using partials for callback calling
a44063d6
Added translator comments and some docstrings
3e5b03c1
Added type checking to `__call_callback`
e7e1d29f
Made `addButton` a `singledispatchmethod` that will add a `MessageDia…
08360fd6
Refactored `addOkButton` and `addCancelButton` to be `partialmethod`s…
917d8e46
Added multi button add method
273d771d
Documentation improvements
8f1bcba0
Added deque to track open MessageDialog instances
5e9d4c5e
Refactored to use a registry oif callbacks
f8cde120
Added adders for oother default button types
ac2be855
Added custom button IDs
bcc49f91
Various code clean-ups
1a95e060
Partially working modal dialogs
5ec943eb
Better handling of modal dialogs (still not woroking properly as bloc…
dbca1440
Fixed problem with blocking instances exist
c0d0f35e
WIP better performance tracing and layout encapsulation
2140a454
Reorganised MessageDialog code
0beba174
Fixed return codes not working
648ad0a4
Explicitly hide dialog when closing
2f82b4b3
Added escape code enum to support ID_NONE and ID_ANY
30535148
Changed MessageDialogButton.default to MessageDialogButton.default_fo…
b0b24492
Corrected variable names
898c24e4
Removed staticmethods to classmethods
92bc0ffd
Made isBlocking a property
0a66a760
Improved type annotations
1ee10c39
Documentation improvements
c302f728
Made Show and ShowModal work in line with wx.Dialog expectations
0010195d
Added help id argument
23172ad0
Added exception for trying to show a MessageDialog without buttons
bbe7c332
Renamed DefaultMessageDialogButtons to DefaultMessageDialogButton
81ba8cbe
Added an enumeration of common button combinations, and a buttons par…
a79d98d2
Used MessageDialog for about dialog
58edca29
Added deprecation warning to gui.message.messageBox
c9c4eff3
Re-enabled system test "Quits from keyboard with about dialog open"
e740ac7f
Updated block action to bring blocking dialogs to foreground
335f58f5
Default action forces close
db03d56a
Added a docstring
6766cf50
Added a draft class-level docstring
d0ff5cf5
Respect CloseEvent.CanVeto
cb247abf
Initial message dialog unit tests
0f4a4f51
Refactored to use a common base class
1d02fffc
Removed default button assignment (reimplement later)
7987c300
Tests for adding standard buttons
eca4e670
Added support for adding DefaultMessageDialogButtons with MessageDial…
9fdd6039
Added methods to easily add default buttons and unit tests for same
b5a928cc
Add hasDefaultAction property
214e62b7
Add docstrings
8c11e0b1
Improved implementation of default action getters
2e836aea
Slightly refactored tests and improved docstrings for some tests
561e9d09
Slight refacter to closing logic
86fc6748
Re-implemented get default action and tests for same
725ef748
Made _getDefaultActionOrFallback comply with the return type opf _get…
48ec32b6
Added additional setters and tests
4114a0a5
Call default callback when closing programatically
b4ff1e1a
Added docstrings to tests
a1faa51f
Made fallback default action more robust
d7518048
Renamed several double-underscored variables and methods to be single…
abb5a6db
Added tests and docstrings
90117c31
Added lots of docstrings.
734703f4
Made a bunch of class names more usable
a4b708a7
Fixed some type info
540b1bcd
Added tests for _flatten_buttons
ed30a0c9
Made the Show method comply with that of wx.Dialog
7577e915
Documentation improvements
e7b5f602
Restored behaviour of having an OK button as default
e0917b8b
Fixed label not being applied to buttons.
e422e266
Made id and button positional-only
403fed68
Rename several button properties to bring them into line with NVDA co…
dc7b4597
Parameterized tests for the default button adders to make code more DRY
bd63423c
Test that buttons are unique when adding
3efdb806
Changed addButtons to accept an Collection of Buttons, rather than an…
67d59705
Remove _flattenButtons
14016401
Fixed some types
3c59af3b
Tightened some logic and made the close box enabled only when there i…
b095d2e0
Fixed test dialog
904befd8
Formatted
59ea918a
Reimplemented gui.message.messageBox using MessageDialog
49c6a2da
Re-implemented the message box shim
d567f1f7
Refactored and documented.
fca7eb82
Added a helper function for calling wx functions on the main thread a…
0bcb7dc6
Used new wxCallOnMain function foor message box shim
51748264
Tidied up message box shim
c24b49e4
Added new function to changes
209b6537
Only allow instantiating message dialogs from the GUI thread
b0e686dd
Fixed implementation of isBlocking and FocusBlockingInstances
9757bb2c
Added helper methods for alert, confirm and query dialogs
2c164308
Added some methods to be implemented
594c943a
Added more main thread checks
9072f3aa
Started implementation of message.MessageDialog -> messageDialog.Mess…
f3331c36
Fixed duplicate superclass of gui.nvdaControls._ContinueCancelDialog
e266bc97
Refactored show checks into their own private method
5655da1c
Old message dialog shimmed to new one and working with screen curtain…
27352c3c
Refactor checks to make them easier to override in subclasses.
e65e74bf
Shim for gui.nvdaControls.MessageDialog seems to work fine.
e72cf5d3
Add sentinel value to allow discrimination of `None` and "not provided".
5cb75b94
Allow overriding the implicit return code of the action ID by providi…
6cabca8b
Update shims of gui.nvdaControls.MessageDialog and gui.nvdaControls._…
d99f5a40
Update changelog
c4dc3f94
Added means of changing button labels.
1278d16f
Added the ability to set the message text independent of the __init__
c55c6e16
Improve logic of alert, confirm and ask classmethods.
cc5274a1
Slight reorganisation in some methods.
17fd510e
Code documentation improvements.
3e9850a1
Docstring for MessageDialog._commands
9d804590
Improved logic for whether dialogs are blocking
ff61f9d9
Added callback field to gui.blockAction._Context, and refactored the …
86c472a3
Code style and documentation for gui.guiHelper.wxCallOnMain.
01284dea
Code clean up and documentation improvements to gui.message.messageBox.
1f0cfba8
Documentation improvements to gui.nvdaControls.MessageDialog
e9942ce3
Removed old gui.nvdaControls.MessageDialog code.
129fcead
Added commit references to changes
fc9e35b7
Fixed type hints for MethodCall
d2eef13a
Changed getDialogState to return a dictionary of button IDs and their…
b55c0e5c
Fixed return from getDialogState
90655247
Added tests for setting button labels.
0782453f
Parameterised tests of setIcon and playSound to cover all dialog types.
c5f55b33
Fixed test name
b947d208
Added test for adding buttons with custom overrides.
acd12402
Removed use of deprecated log.warn
adc2d238
Added test for adding buttons with non-unique IDs
2cfa0f8b
Fixed use of FindWindowById to FindWindow(id)
8816470c
Added tests for setting default focus.
371848ac
Removed unnecessary error case from _getFallbackAction
7a28c4bb
Fixed logic for when the default focus is not in command registry
1d033db1
Added further fallback action tests
a4a4e7c8
Added more tests for setting button labels
acad2ffe
Refactored MdTestBase into WxTestBase -> MdTestBase
b5a38950
Added tests for threading
614e6495
Fixed test case name
b1a34578
Added unittests for showing and hiding
020a78b5
Improved modal show tests.
7559b3fe
Added tests for showEvent
428a6ed7
Fixed implementation of _getFallbackAction, _getFallbackActionOrFallb…
f4ed2d12
Added tests for blocking dialogs.
30b8c64b
Fixed issue when force-closing non-modal dialog
6f2d760f
Renamed _execute_command to _executeCommand
e5054ab4
Added tests for _onCloseEvent
ca5e0ad2
Added test for closeInstances
d8073b4b
Added tests for isBlocking
32308601
Renamed hasDefaultAction to hasFallback to match rename of defaultAct…
05c7540a
Added tests for executeCommand
8b22b047
Added guidance on dialog types
c419a589
Renamed setDefaultAction to setFallbackAction
c26dfb53
Doocstring improvements
3b3be1b8
Renamed EscapeCode members to be more self documenting
679b2a74
Renamed _realize_layout to _realizeLayout in line with NV Access style
57ca1542
Added a bunch of missing docstrings
d00e5ea8
Removed some commented out code
b38630a4
Initial docs
aa207b5d
Added docstring to __init__
ec434463
Added documentation of convenience methods to dev docs
6b5e084c
Moved DialogType to gui.message
ead1ec56
Moved EscapeCode to gui.message
0cf5f156
Moved DialogType to gui.message
4f86bfda
Moved over the rest of gui.messageDialog to gui.message
6bb8a4c6
Updated copyright years
9ebe8cc4
Improvements to tests
8df35533
Renamed tests to be more in line with NVDA style
e9b95d0b
Removed testing items from NVDA menu.
a8505855
Updated dev docs with information on importing
a4b82e62
Updated changes
2ce68392
Deleted old messageDialog.py file
18f8fc9d
Merge branch 'master' into messageDialogApi
23a6114b
Pre-commit auto-fix
be3f2239
Made delay before block message a constant
1bb02f7f
Fixed misspelling
81be5238
Added explicit import to first example in developer guide for clarity
581dc332
Made thread safety warning more prominant
3dc12063
Added note on custom button IDs
e256e4f6
Fixed outdated docstring
7db3eb19
Added error checking to _onCloseEvent
c29ecf6e
Renamed event handlers to be more consistant
20f0e59d
Update requirements.txt
6c68ce66
Update source/gui/blockAction.py
c296eb9c
Rewrote wxCallOnMain to use nonlocal rather than helper class
39fbd5b3
Update source/gui/guiHelper.py
c5d775e2
Update source/gui/guiHelper.py
a59912a0
Update user_docs/en/changes.md
85cbef9c
Made dialog destruction and deletion more robust
21614a99
Fixed incorrect call to warn
8ae47bc6
Made runScriptModal safer, and marked it for removal
81cc995f
Merge branch 'i13007' of https://github.com/nvaccess/nvda into messag…
448630bf
Added type hints to _onActivateEvent and _onShowEvent for the screen …
41c01f5f
Apply suggestions from code review
8990d9c7
Changed some methods to use lower camel case
08bbbd16
Improved logging
db53c838
Apply suggestions from code review
ca09d428
Removed footnotes from the developer guide
da2fe290
Removed __del__ that was failing
451f3705
Corrects to dev guide
fcafc8a7
Corrections to dev guide
0c7a6c7d
Merge branch 'i13007' of https://github.com/nvaccess/nvda into messag…
65ced3cd
Apply suggestions from code review
8b02b720
Made several parameterized argument lists namedtuples for readability
0dce0e97
Merge branch 'master' into messageDialogApi
0c991518
Fixed up admonissions
f52a07e8
Added notes on thread safety
f4377238
Restore MessageDialog inheriting from ContextHelpMixin
ba888840
Merge branch 'master' into messageDialogApi2
374dc7ea
Slightly refactor `UpdateAskInstallDialog` not to take any action on …
3893564f
Documentation
28931c28
Updated other instances to use new call style
20a56dbd
Update changes
ae893e4f
SaschaCowley
marked this pull request as ready for review 1 year ago
seanbudd
approved these changes
on 2025-01-06
Update source/updateCheck.py
0a258056
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub