1818from logHandler import log
1919import gui
2020from gui import guiHelper
21- from gui .dpiScalingHelper import DpiScalingHelperMixin
21+ from gui .dpiScalingHelper import DpiScalingHelperMixin , DpiScalingHelperMixinWithoutInit
22+ from .contextHelp import ContextHelpMixin
2223import tones
2324import systemUtils
2425
@@ -102,14 +103,19 @@ def doSilentInstall(startAfterInstall=True):
102103 startAfterInstall = startAfterInstall
103104 )
104105
105- class InstallerDialog (wx .Dialog , DpiScalingHelperMixin ):
106+ class InstallerDialog (
107+ DpiScalingHelperMixinWithoutInit ,
108+ gui .ContextHelpMixin ,
109+ wx .Dialog , # wxPython does not seem to call base class initializer, put last in MRO
110+ ):
111+
112+ helpId = "InstallingNVDA"
106113
107114 def __init__ (self , parent , isUpdate ):
108115 self .isUpdate = isUpdate
109116 self .textWrapWidth = 600
110117 # Translators: The title of the Install NVDA dialog.
111- wx .Dialog .__init__ (self , parent , title = _ ("Install NVDA" ))
112- DpiScalingHelperMixin .__init__ (self , self .GetHandle ())
118+ super ().__init__ (parent , title = _ ("Install NVDA" ))
113119
114120 import addonHandler
115121 shouldAskAboutAddons = any (addonHandler .getIncompatibleAddons (
@@ -146,6 +152,7 @@ def __init__(self, parent, isUpdate):
146152 # available, will be disabled after installation.
147153 label = _ ("I understand that these incompatible add-ons will be disabled" )
148154 ))
155+ self .bindHelpEvent ("InstallWithIncompatibleAddons" , self .confirmationCheckbox )
149156 self .confirmationCheckbox .SetFocus ()
150157
151158 optionsSizer = guiHelper .BoxSizerHelper (self , sizer = sHelper .addItem (wx .StaticBoxSizer (
@@ -160,6 +167,7 @@ def __init__(self, parent, isUpdate):
160167 # Translators: The label of a checkbox option in the Install NVDA dialog.
161168 startOnLogonText = _ ("Use NVDA during sign-in" )
162169 self .startOnLogonCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = startOnLogonText ))
170+ self .bindHelpEvent ("StartAtWindowsLogon" , self .startOnLogonCheckbox )
163171 if globalVars .appArgs .enableStartOnLogon is not None :
164172 self .startOnLogonCheckbox .Value = globalVars .appArgs .enableStartOnLogon
165173 else :
@@ -176,11 +184,13 @@ def __init__(self, parent, isUpdate):
176184 # this change must also be reflected here.
177185 createShortcutText = _ ("Create &desktop icon and shortcut key (control+alt+n)" )
178186 self .createDesktopShortcutCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createShortcutText ))
187+ self .bindHelpEvent ("CreateDesktopShortcut" , self .createDesktopShortcutCheckbox )
179188 self .createDesktopShortcutCheckbox .Value = shortcutIsPrevInstalled if self .isUpdate else True
180189
181190 # Translators: The label of a checkbox option in the Install NVDA dialog.
182191 createPortableText = _ ("Copy &portable configuration to current user account" )
183192 self .copyPortableConfigCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createPortableText ))
193+ self .bindHelpEvent ("CopyPortableConfigurationToCurrentUserAccount" , self .copyPortableConfigCheckbox )
184194 self .copyPortableConfigCheckbox .Value = False
185195 if globalVars .appArgs .launcher :
186196 self .copyPortableConfigCheckbox .Disable ()
@@ -189,6 +199,7 @@ def __init__(self, parent, isUpdate):
189199 if shouldAskAboutAddons :
190200 # Translators: The label of a button to launch the add-on compatibility review dialog.
191201 reviewAddonButton = bHelper .addButton (self , label = _ ("&Review add-ons..." ))
202+ self .bindHelpEvent ("InstallWithIncompatibleAddons" , reviewAddonButton )
192203 reviewAddonButton .Bind (wx .EVT_BUTTON , self .onReviewAddons )
193204
194205 # Translators: The label of a button to continue with the operation.
@@ -283,11 +294,16 @@ def showInstallGui():
283294 InstallerDialog (gui .mainFrame , previous is not None ).Show ()
284295 gui .mainFrame .postPopup ()
285296
286- class PortableCreaterDialog (wx .Dialog ):
297+ class PortableCreaterDialog (
298+ ContextHelpMixin ,
299+ wx .Dialog , # wxPython does not seem to call base class initializer, put last in MRO
300+ ):
301+
302+ helpId = "CreatePortableCopy"
287303
288304 def __init__ (self , parent ):
289305 # Translators: The title of the Create Portable NVDA dialog.
290- super (PortableCreaterDialog , self ).__init__ (parent , title = _ ("Create Portable NVDA" ))
306+ super ().__init__ (parent , title = _ ("Create Portable NVDA" ))
291307 mainSizer = self .mainSizer = wx .BoxSizer (wx .VERTICAL )
292308 sHelper = gui .guiHelper .BoxSizerHelper (self , orientation = wx .VERTICAL )
293309
0 commit comments