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,20 @@ def doSilentInstall(startAfterInstall=True):
102103 startAfterInstall = startAfterInstall
103104 )
104105
105- class InstallerDialog (wx .Dialog , DpiScalingHelperMixin ):
106+
107+ class InstallerDialog (
108+ DpiScalingHelperMixinWithoutInit ,
109+ gui .ContextHelpMixin ,
110+ wx .Dialog , # wxPython does not seem to call base class initializer, put last in MRO
111+ ):
112+
113+ helpId = "InstallingNVDA"
106114
107115 def __init__ (self , parent , isUpdate ):
108116 self .isUpdate = isUpdate
109117 self .textWrapWidth = 600
110118 # Translators: The title of the Install NVDA dialog.
111- wx .Dialog .__init__ (self , parent , title = _ ("Install NVDA" ))
112- DpiScalingHelperMixin .__init__ (self , self .GetHandle ())
119+ super ().__init__ (parent , title = _ ("Install NVDA" ))
113120
114121 import addonHandler
115122 shouldAskAboutAddons = any (addonHandler .getIncompatibleAddons (
@@ -146,6 +153,7 @@ def __init__(self, parent, isUpdate):
146153 # available, will be disabled after installation.
147154 label = _ ("I understand that these incompatible add-ons will be disabled" )
148155 ))
156+ self .bindHelpEvent ("InstallWithIncompatibleAddons" , self .confirmationCheckbox )
149157 self .confirmationCheckbox .SetFocus ()
150158
151159 optionsSizer = guiHelper .BoxSizerHelper (self , sizer = sHelper .addItem (wx .StaticBoxSizer (
@@ -160,6 +168,7 @@ def __init__(self, parent, isUpdate):
160168 # Translators: The label of a checkbox option in the Install NVDA dialog.
161169 startOnLogonText = _ ("Use NVDA during sign-in" )
162170 self .startOnLogonCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = startOnLogonText ))
171+ self .bindHelpEvent ("StartAtWindowsLogon" , self .startOnLogonCheckbox )
163172 if globalVars .appArgs .enableStartOnLogon is not None :
164173 self .startOnLogonCheckbox .Value = globalVars .appArgs .enableStartOnLogon
165174 else :
@@ -176,11 +185,13 @@ def __init__(self, parent, isUpdate):
176185 # this change must also be reflected here.
177186 createShortcutText = _ ("Create &desktop icon and shortcut key (control+alt+n)" )
178187 self .createDesktopShortcutCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createShortcutText ))
188+ self .bindHelpEvent ("CreateDesktopShortcut" , self .createDesktopShortcutCheckbox )
179189 self .createDesktopShortcutCheckbox .Value = shortcutIsPrevInstalled if self .isUpdate else True
180190
181191 # Translators: The label of a checkbox option in the Install NVDA dialog.
182192 createPortableText = _ ("Copy &portable configuration to current user account" )
183193 self .copyPortableConfigCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createPortableText ))
194+ self .bindHelpEvent ("CopyPortableConfigurationToCurrentUserAccount" , self .copyPortableConfigCheckbox )
184195 self .copyPortableConfigCheckbox .Value = False
185196 if globalVars .appArgs .launcher :
186197 self .copyPortableConfigCheckbox .Disable ()
@@ -189,6 +200,7 @@ def __init__(self, parent, isUpdate):
189200 if shouldAskAboutAddons :
190201 # Translators: The label of a button to launch the add-on compatibility review dialog.
191202 reviewAddonButton = bHelper .addButton (self , label = _ ("&Review add-ons..." ))
203+ self .bindHelpEvent ("InstallWithIncompatibleAddons" , reviewAddonButton )
192204 reviewAddonButton .Bind (wx .EVT_BUTTON , self .onReviewAddons )
193205
194206 # Translators: The label of a button to continue with the operation.
@@ -227,11 +239,17 @@ def onReviewAddons(self, evt):
227239 )
228240 incompatibleAddons .ShowModal ()
229241
230- class InstallingOverNewerVersionDialog (wx .Dialog , DpiScalingHelperMixin ):
242+ class InstallingOverNewerVersionDialog (
243+ DpiScalingHelperMixinWithoutInit ,
244+ gui .ContextHelpMixin ,
245+ wx .Dialog , # wxPython does not seem to call base class initializer, put last in MRO
246+ ):
247+
248+ helpId = "InstallingNVDA"
249+
231250 def __init__ (self ):
232251 # Translators: The title of a warning dialog.
233- wx .Dialog .__init__ (self , gui .mainFrame , title = _ ("Warning" ))
234- DpiScalingHelperMixin .__init__ (self , self .GetHandle ())
252+ super ().__init__ (gui .mainFrame , title = _ ("Warning" ))
235253
236254 mainSizer = wx .BoxSizer (wx .VERTICAL )
237255 contentSizer = guiHelper .BoxSizerHelper (self , orientation = wx .VERTICAL )
@@ -283,11 +301,17 @@ def showInstallGui():
283301 InstallerDialog (gui .mainFrame , previous is not None ).Show ()
284302 gui .mainFrame .postPopup ()
285303
286- class PortableCreaterDialog (wx .Dialog ):
304+
305+ class PortableCreaterDialog (
306+ ContextHelpMixin ,
307+ wx .Dialog , # wxPython does not seem to call base class initializer, put last in MRO
308+ ):
309+
310+ helpId = "CreatePortableCopy"
287311
288312 def __init__ (self , parent ):
289313 # Translators: The title of the Create Portable NVDA dialog.
290- super (PortableCreaterDialog , self ).__init__ (parent , title = _ ("Create Portable NVDA" ))
314+ super ().__init__ (parent , title = _ ("Create Portable NVDA" ))
291315 mainSizer = self .mainSizer = wx .BoxSizer (wx .VERTICAL )
292316 sHelper = gui .guiHelper .BoxSizerHelper (self , orientation = wx .VERTICAL )
293317
0 commit comments