2424 ButtonHelper ,
2525 SPACE_BETWEEN_VERTICAL_DIALOG_ITEMS ,
2626)
27- from gui .message import messageBox
27+ from gui .message import displayDialogAsModal , messageBox
2828import windowUtils
2929
3030if TYPE_CHECKING :
@@ -81,13 +81,14 @@ def _shouldProceedWhenInstalledAddonVersionUnknown(
8181 lastTestedNVDAVersion = addonAPIVersion .formatForGUI (addon .lastTestedNVDAVersion ),
8282 NVDAVersion = addonAPIVersion .formatForGUI (addonAPIVersion .CURRENT )
8383 )
84- return ErrorAddonInstallDialogWithYesNoButtons (
84+ res = displayDialogAsModal ( ErrorAddonInstallDialogWithYesNoButtons (
8585 parent = parent ,
8686 # Translators: The title of a dialog presented when an error occurs.
8787 title = pgettext ("addonStore" , "Add-on not compatible" ),
8888 message = incompatibleMessage ,
8989 showAddonInfoFunction = lambda : _showAddonInfo (addon )
90- ).ShowModal () == wx .YES
90+ ))
91+ return res == wx .YES
9192
9293
9394def _shouldProceedToRemoveAddonDialog (
@@ -127,13 +128,14 @@ def _shouldInstallWhenAddonTooOldDialog(
127128 lastTestedNVDAVersion = addonAPIVersion .formatForGUI (addon .lastTestedNVDAVersion ),
128129 NVDAVersion = addonAPIVersion .formatForGUI (addonAPIVersion .CURRENT )
129130 )
130- return ErrorAddonInstallDialogWithYesNoButtons (
131+ res = displayDialogAsModal ( ErrorAddonInstallDialogWithYesNoButtons (
131132 parent = parent ,
132133 # Translators: The title of a dialog presented when an error occurs.
133134 title = pgettext ("addonStore" , "Add-on not compatible" ),
134135 message = incompatibleMessage ,
135136 showAddonInfoFunction = lambda : _showAddonInfo (addon )
136- ).ShowModal () == wx .YES
137+ ))
138+ return res == wx .YES
137139
138140
139141def _shouldEnableWhenAddonTooOldDialog (
@@ -156,13 +158,14 @@ def _shouldEnableWhenAddonTooOldDialog(
156158 lastTestedNVDAVersion = addonAPIVersion .formatForGUI (addon .lastTestedNVDAVersion ),
157159 NVDAVersion = addonAPIVersion .formatForGUI (addonAPIVersion .CURRENT )
158160 )
159- return ErrorAddonInstallDialogWithYesNoButtons (
161+ res = displayDialogAsModal ( ErrorAddonInstallDialogWithYesNoButtons (
160162 parent = parent ,
161163 # Translators: The title of a dialog presented when an error occurs.
162164 title = pgettext ("addonStore" , "Add-on not compatible" ),
163165 message = incompatibleMessage ,
164166 showAddonInfoFunction = lambda : _showAddonInfo (addon )
165- ).ShowModal () == wx .YES
167+ ))
168+ return res == wx .YES
166169
167170
168171def _showAddonInfo (addon : _AddonGUIModel ) -> None :
0 commit comments