Skip to content

Commit c1b1aff

Browse files
committed
Branche le bouton Configurations avancées
Récupération du bouton advanced_cfg_btn dans l'UI Connexion au nouvel éditeur via open_advanced_config_editor Gestion d'erreurs avec log_i18n sans emojis
1 parent f0ad4f7 commit c1b1aff

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Core/UiConnection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ def _find(cls, name: str):
462462
self.btn_export_config = _find(QPushButton, "btn_export_config")
463463
self.btn_import_config = _find(QPushButton, "btn_import_config")
464464
self.btn_show_stats = _find(QPushButton, "btn_show_stats")
465+
self.advanced_cfg_btn = _find(QPushButton, "advanced_cfg_btn")
465466
self.select_lang = _find(QPushButton, "select_lang")
466467
self.select_theme = _find(QPushButton, "select_theme")
467468

@@ -543,6 +544,7 @@ def _connect_text(widget, handler) -> None:
543544
_connect_clicked(self.btn_remove_file, self.remove_selected_file)
544545
_connect_clicked(self.compile_btn, self.compile_all)
545546
_connect_clicked(self.cancel_btn, self.cancel_all_compilations)
547+
_connect_clicked(self.advanced_cfg_btn, self.open_advanced_config_editor)
546548

547549
if self.btn_clear_workspace:
548550
_connect_clicked(self.btn_clear_workspace, self.clear_workspace)

Core/UiFeatures.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,3 +746,20 @@ def _apply_main_app_translations(self, tr: dict) -> None:
746746
from .i18n import _apply_main_app_translations as _i18n_apply_translations
747747

748748
_i18n_apply_translations(self, tr)
749+
750+
def open_advanced_config_editor(self):
751+
"""Open the advanced config editor dialog."""
752+
try:
753+
from .AdvancedConfigEditor import AdvancedConfigEditor
754+
755+
dlg = AdvancedConfigEditor(self)
756+
dlg.setModal(True)
757+
dlg.exec()
758+
except Exception as e:
759+
try:
760+
self.log_i18n(
761+
f"Erreur ouverture configurations avancées: {e}",
762+
f"Failed to open advanced configurations: {e}",
763+
)
764+
except Exception:
765+
pass

0 commit comments

Comments
 (0)