@@ -1267,25 +1267,25 @@ async def _fetch_sys():
12671267
12681268 def update_command_preview (self ):
12691269 # Aperçu de commande désactivé: widget label_cmd retiré
1270- # Résumé des options
1270+ # Résumé des options - only check static widgets if they exist
12711271 summary = []
1272- if self .opt_onefile .isChecked ():
1272+ if hasattr ( self , "opt_onefile" ) and self . opt_onefile is not None and self .opt_onefile .isChecked ():
12731273 summary .append ("Onefile" )
1274- if self .opt_windowed .isChecked ():
1274+ if hasattr ( self , "opt_windowed" ) and self . opt_windowed is not None and self .opt_windowed .isChecked ():
12751275 summary .append ("Windowed" )
1276- if self .opt_noconfirm .isChecked ():
1276+ if hasattr ( self , "opt_noconfirm" ) and self . opt_noconfirm is not None and self .opt_noconfirm .isChecked ():
12771277 summary .append ("Noconfirm" )
1278- if self .opt_clean .isChecked ():
1278+ if hasattr ( self , "opt_clean" ) and self . opt_clean is not None and self .opt_clean .isChecked ():
12791279 summary .append ("Clean" )
1280- if self .opt_noupx .isChecked ():
1280+ if hasattr ( self , "opt_noupx" ) and self . opt_noupx is not None and self .opt_noupx .isChecked ():
12811281 summary .append ("NoUPX" )
1282- if self .opt_debug .isChecked ():
1282+ if hasattr ( self , "opt_debug" ) and self . opt_debug is not None and self .opt_debug .isChecked ():
12831283 summary .append ("Debug" )
1284- if self .opt_auto_install .isChecked ():
1284+ if hasattr ( self , "opt_auto_install" ) and self . opt_auto_install is not None and self .opt_auto_install .isChecked ():
12851285 summary .append ("Auto-install modules" )
1286- if self .icon_path :
1286+ if hasattr ( self , "icon_path" ) and self .icon_path :
12871287 summary .append ("Icone" )
1288- if self .output_dir_input .text ().strip ():
1288+ if hasattr ( self , "output_dir_input" ) and self . output_dir_input is not None and self .output_dir_input .text ().strip ():
12891289 summary .append (f"Sortie: { self .output_dir_input .text ().strip ()} " )
12901290 # Widget options_summary supprimé; plus de mise à jour de résumé visuel
12911291
@@ -1358,19 +1358,17 @@ def set_controls_enabled(self, enabled):
13581358 except Exception :
13591359 pass
13601360 self .venv_button .setEnabled (enabled )
1361- self .output_dir_input .setEnabled (enabled )
1362- # Désactive toutes les cases à cocher d'options
1363- for checkbox in [
1364- self .opt_onefile ,
1365- self .opt_windowed ,
1366- self .opt_noconfirm ,
1367- self .opt_clean ,
1368- self .opt_noupx ,
1369- self .opt_main_only ,
1370- self .opt_debug ,
1371- self .opt_auto_install ,
1372- self .opt_silent_errors ,
1373- ]:
1361+ # Enable/disable static output_dir_input if it exists
1362+ if hasattr (self , "output_dir_input" ) and self .output_dir_input is not None :
1363+ self .output_dir_input .setEnabled (enabled )
1364+ # Désactive toutes les cases à cocher d'options (only if they exist)
1365+ checkbox_list = []
1366+ for name in ["opt_onefile" , "opt_windowed" , "opt_noconfirm" , "opt_clean" ,
1367+ "opt_noupx" , "opt_main_only" , "opt_debug" , "opt_auto_install" ,
1368+ "opt_silent_errors" ]:
1369+ if hasattr (self , name ) and getattr (self , name ) is not None :
1370+ checkbox_list .append (getattr (self , name ))
1371+ for checkbox in checkbox_list :
13741372 checkbox .setEnabled (enabled )
13751373 # Rafraîchir visuellement l'état grisé de tous les contrôles sensibles
13761374 try :
0 commit comments