@@ -175,18 +175,15 @@ def __init__(self, parent, isUpdate):
175175 self .bindHelpEvent ("InstallWithIncompatibleAddons" , self .confirmationCheckbox )
176176 self .confirmationCheckbox .SetFocus ()
177177
178- optionsSizer = guiHelper .BoxSizerHelper (self , sizer = sHelper .addItem (wx .StaticBoxSizer (
179- wx .StaticBox (
180- self ,
181- # Translators: The label for a group box containing the NVDA installation dialog options.
182- label = _ ("Options" )
183- ),
184- wx .VERTICAL
185- )))
178+ # Translators: The label for a group box containing the NVDA installation dialog options.
179+ optionsLabel = _ ("Options" )
180+ optionsHelper = sHelper .addItem (wx .StaticBoxSizer (wx .VERTICAL , self , label = optionsLabel ))
181+ optionsSizer = guiHelper .BoxSizerHelper (self , sizer = optionsHelper )
182+ optionsBox = optionsSizer .GetStaticBox ()
186183
187184 # Translators: The label of a checkbox option in the Install NVDA dialog.
188185 startOnLogonText = _ ("Use NVDA during sign-in" )
189- self .startOnLogonCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = startOnLogonText ))
186+ self .startOnLogonCheckbox = optionsSizer .addItem (wx .CheckBox (optionsBox , label = startOnLogonText ))
190187 self .bindHelpEvent ("StartAtWindowsLogon" , self .startOnLogonCheckbox )
191188 if globalVars .appArgs .enableStartOnLogon is not None :
192189 self .startOnLogonCheckbox .Value = globalVars .appArgs .enableStartOnLogon
@@ -197,19 +194,22 @@ def __init__(self, parent, isUpdate):
197194 if self .isUpdate and shortcutIsPrevInstalled :
198195 # Translators: The label of a checkbox option in the Install NVDA dialog.
199196 keepShortCutText = _ ("&Keep existing desktop shortcut" )
200- self .createDesktopShortcutCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = keepShortCutText ))
197+ keepShortCutBox = wx .CheckBox (optionsBox , label = keepShortCutText )
198+ self .createDesktopShortcutCheckbox = optionsSizer .addItem (keepShortCutBox )
201199 else :
202200 # Translators: The label of the option to create a desktop shortcut in the Install NVDA dialog.
203201 # If the shortcut key has been changed for this locale,
204202 # this change must also be reflected here.
205203 createShortcutText = _ ("Create &desktop icon and shortcut key (control+alt+n)" )
206- self .createDesktopShortcutCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createShortcutText ))
204+ createShortcutBox = wx .CheckBox (optionsBox , label = createShortcutText )
205+ self .createDesktopShortcutCheckbox = optionsSizer .addItem (createShortcutBox )
207206 self .bindHelpEvent ("CreateDesktopShortcut" , self .createDesktopShortcutCheckbox )
208207 self .createDesktopShortcutCheckbox .Value = shortcutIsPrevInstalled if self .isUpdate else True
209208
210209 # Translators: The label of a checkbox option in the Install NVDA dialog.
211210 createPortableText = _ ("Copy &portable configuration to current user account" )
212- self .copyPortableConfigCheckbox = optionsSizer .addItem (wx .CheckBox (self , label = createPortableText ))
211+ createPortableBox = wx .CheckBox (optionsBox , label = createPortableText )
212+ self .copyPortableConfigCheckbox = optionsSizer .addItem (createPortableBox )
213213 self .bindHelpEvent ("CopyPortableConfigurationToCurrentUserAccount" , self .copyPortableConfigCheckbox )
214214 self .copyPortableConfigCheckbox .Value = bool (globalVars .appArgs .copyPortableConfig )
215215 if globalVars .appArgs .copyPortableConfig is None :
@@ -220,12 +220,12 @@ def __init__(self, parent, isUpdate):
220220 bHelper = sHelper .addDialogDismissButtons (guiHelper .ButtonHelper (wx .HORIZONTAL ))
221221 if shouldAskAboutAddons :
222222 # Translators: The label of a button to launch the add-on compatibility review dialog.
223- reviewAddonButton = bHelper .addButton (self , label = _ ("&Review add-ons..." ))
223+ reviewAddonButton = bHelper .addButton (optionsBox , label = _ ("&Review add-ons..." ))
224224 self .bindHelpEvent ("InstallWithIncompatibleAddons" , reviewAddonButton )
225225 reviewAddonButton .Bind (wx .EVT_BUTTON , self .onReviewAddons )
226226
227227 # Translators: The label of a button to continue with the operation.
228- continueButton = bHelper .addButton (self , label = _ ("&Continue" ), id = wx .ID_OK )
228+ continueButton = bHelper .addButton (optionsBox , label = _ ("&Continue" ), id = wx .ID_OK )
229229 continueButton .SetDefault ()
230230 continueButton .Bind (wx .EVT_BUTTON , self .onInstall )
231231 if shouldAskAboutAddons :
@@ -235,7 +235,7 @@ def __init__(self, parent, isUpdate):
235235 )
236236 continueButton .Enable (False )
237237
238- bHelper .addButton (self , id = wx .ID_CANCEL )
238+ bHelper .addButton (optionsBox , id = wx .ID_CANCEL )
239239 # If we bind this using button.Bind, it fails to trigger when the dialog is closed.
240240 self .Bind (wx .EVT_BUTTON , self .onCancel , id = wx .ID_CANCEL )
241241
@@ -349,35 +349,38 @@ def __init__(self, parent):
349349 # Translators: The label of a grouping containing controls to select the destination directory
350350 # in the Create Portable NVDA dialog.
351351 directoryGroupText = _ ("Portable &directory:" )
352- groupHelper = sHelper .addItem (gui .guiHelper .BoxSizerHelper (self , sizer = wx .StaticBoxSizer (wx .StaticBox (self , label = directoryGroupText ), wx .VERTICAL )))
352+ groupSizer = wx .StaticBoxSizer (wx .VERTICAL , self , label = directoryGroupText )
353+ groupHelper = sHelper .addItem (gui .guiHelper .BoxSizerHelper (self , sizer = groupSizer ))
354+ groupBox = groupSizer .GetStaticBox ()
353355 # Translators: The label of a button to browse for a directory.
354356 browseText = _ ("Browse..." )
355357 # Translators: The title of the dialog presented when browsing for the
356358 # destination directory when creating a portable copy of NVDA.
357359 dirDialogTitle = _ ("Select portable directory" )
358- directoryEntryControl = groupHelper .addItem (gui .guiHelper .PathSelectionHelper (self , browseText , dirDialogTitle ))
360+ directoryPathHelper = gui .guiHelper .PathSelectionHelper (groupBox , browseText , dirDialogTitle )
361+ directoryEntryControl = groupHelper .addItem (directoryPathHelper )
359362 self .portableDirectoryEdit = directoryEntryControl .pathControl
360363 if globalVars .appArgs .portablePath :
361364 self .portableDirectoryEdit .Value = globalVars .appArgs .portablePath
362365
363366 # Translators: The label of a checkbox option in the Create Portable NVDA dialog.
364367 copyConfText = _ ("Copy current &user configuration" )
365- self .copyUserConfigCheckbox = sHelper .addItem (wx .CheckBox (self , label = copyConfText ))
368+ self .copyUserConfigCheckbox = sHelper .addItem (wx .CheckBox (groupBox , label = copyConfText ))
366369 self .copyUserConfigCheckbox .Value = False
367370 if globalVars .appArgs .launcher :
368371 self .copyUserConfigCheckbox .Disable ()
369372 # Translators: The label of a checkbox option in the Create Portable NVDA dialog.
370373 startAfterCreateText = _ ("&Start the new portable copy after creation" )
371- self .startAfterCreateCheckbox = sHelper .addItem (wx .CheckBox (self , label = startAfterCreateText ))
374+ self .startAfterCreateCheckbox = sHelper .addItem (wx .CheckBox (groupBox , label = startAfterCreateText ))
372375 self .startAfterCreateCheckbox .Value = False
373376
374377 bHelper = sHelper .addDialogDismissButtons (gui .guiHelper .ButtonHelper (wx .HORIZONTAL ), separated = True )
375378
376- continueButton = bHelper .addButton (self , label = _ ("&Continue" ), id = wx .ID_OK )
379+ continueButton = bHelper .addButton (groupBox , label = _ ("&Continue" ), id = wx .ID_OK )
377380 continueButton .SetDefault ()
378381 continueButton .Bind (wx .EVT_BUTTON , self .onCreatePortable )
379382
380- bHelper .addButton (self , id = wx .ID_CANCEL )
383+ bHelper .addButton (groupBox , id = wx .ID_CANCEL )
381384 # If we bind this using button.Bind, it fails to trigger when the dialog is closed.
382385 self .Bind (wx .EVT_BUTTON , self .onCancel , id = wx .ID_CANCEL )
383386
0 commit comments