@@ -80,7 +80,11 @@ def _load_ide_like_ui(self) -> None:
8080 """Load the new ide-like UI file and set it as central widget."""
8181 loader = QUiLoader ()
8282 ui_path = os .path .join (
83- os .path .dirname (os .path .abspath (__file__ )), ".." , ".." , "ui" , "ui_ide_design2.ui"
83+ os .path .dirname (os .path .abspath (__file__ )),
84+ ".." ,
85+ ".." ,
86+ "ui" ,
87+ "ui_ide_design2.ui" ,
8488 )
8589 ui_file = QFile (os .path .abspath (ui_path ))
8690 if not ui_file .open (QFile .ReadOnly ):
@@ -97,7 +101,9 @@ def _load_ide_like_ui(self) -> None:
97101 if central is None :
98102 central = loaded .findChild (QWidget , "centralwidget" )
99103 if central is None :
100- raise RuntimeError ("Le fichier UI IDE-like ne contient pas de centralwidget." )
104+ raise RuntimeError (
105+ "Le fichier UI IDE-like ne contient pas de centralwidget."
106+ )
101107 self .ui = central
102108 else :
103109 self .ui = loaded
@@ -184,7 +190,9 @@ def _find(cls, name: str):
184190 self .statusbar = self .findChild (QStatusBar , "statusbar" )
185191 self .status_hint = None
186192 try :
187- self .status_hint = self .statusbar .findChild (QLabel , "status_hint" ) if self .statusbar else None
193+ self .status_hint = (
194+ self .statusbar .findChild (QLabel , "status_hint" ) if self .statusbar else None
195+ )
188196 except Exception :
189197 self .status_hint = None
190198 try :
@@ -282,9 +290,7 @@ def _tr(fr: str, en: str) -> str:
282290 try :
283291 menu = QMenu (more_btn )
284292
285- act_workspace = QAction (
286- _tr ("Selectionner workspace" , "Select workspace" ), menu
287- )
293+ act_workspace = QAction (_tr ("Selectionner workspace" , "Select workspace" ), menu )
288294 act_workspace .triggered .connect (
289295 lambda : getattr (self , "select_workspace" , lambda : None )()
290296 )
@@ -317,7 +323,9 @@ def _tr(fr: str, en: str) -> str:
317323 menu .addSeparator ()
318324
319325 act_language = QAction (_tr ("Langue" , "Language" ), menu )
320- act_language .triggered .connect (lambda : getattr (self , "show_language_dialog" , lambda : None )())
326+ act_language .triggered .connect (
327+ lambda : getattr (self , "show_language_dialog" , lambda : None )()
328+ )
321329 menu .addAction (act_language )
322330
323331 act_theme = QAction (_tr ("Theme" , "Theme" ), menu )
@@ -333,15 +341,21 @@ def _tr(fr: str, en: str) -> str:
333341 menu .addAction (act_advanced )
334342
335343 act_export = QAction (_tr ("Exporter config" , "Export config" ), menu )
336- act_export .triggered .connect (lambda : getattr (self , "export_config" , lambda : None )())
344+ act_export .triggered .connect (
345+ lambda : getattr (self , "export_config" , lambda : None )()
346+ )
337347 menu .addAction (act_export )
338348
339349 act_import = QAction (_tr ("Importer config" , "Import config" ), menu )
340- act_import .triggered .connect (lambda : getattr (self , "import_config" , lambda : None )())
350+ act_import .triggered .connect (
351+ lambda : getattr (self , "import_config" , lambda : None )()
352+ )
341353 menu .addAction (act_import )
342354
343355 act_help = QAction (_tr ("Aide" , "Help" ), menu )
344- act_help .triggered .connect (lambda : getattr (self , "show_help_dialog" , lambda : None )())
356+ act_help .triggered .connect (
357+ lambda : getattr (self , "show_help_dialog" , lambda : None )()
358+ )
345359 menu .addAction (act_help )
346360
347361 more_btn .setMenu (menu )
@@ -464,6 +478,7 @@ def _connect_ide_like_signals(self) -> None:
464478
465479 _bind_status_updates (self )
466480
481+
467482def init_ide_like_ui (self ) -> None :
468483 """Initialize the ide-like UI and wire it to existing Core methods."""
469484 _load_ide_like_ui (self )
0 commit comments