Skip to content

Commit 758cbcf

Browse files
committed
ide-gui: simplifier radicalement la status bar
- retire les details verbeux (workspace, compteurs, progression) - conserve uniquement des etats courts et utiles - reduit le bruit visuel pour une UX plus claire
1 parent 69cb376 commit 758cbcf

1 file changed

Lines changed: 22 additions & 37 deletions

File tree

Core/IdeLikeGui/connections.py

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -604,32 +604,16 @@ def _queue_update() -> None:
604604
except Exception:
605605
pass
606606

607-
progress = getattr(self, "progress", None)
608-
if progress is not None:
609-
try:
610-
progress.valueChanged.connect(lambda *_: _queue_update())
611-
except Exception:
612-
pass
613-
614-
615607
def _update_status_line(self) -> None:
616608
statusbar = getattr(self, "statusbar", None)
617609
if statusbar is None:
618610
return
619611

620-
def _short_path(path: str | None, max_len: int = 28) -> str:
621-
if not path:
622-
return _tr_ui(self, "Aucun", "None")
623-
try:
624-
p = os.path.normpath(path)
625-
except Exception:
626-
p = path
627-
if len(p) <= max_len:
628-
return p
629-
return f"...{p[-max_len:]}"
630-
631-
ws = _short_path(getattr(self, "workspace_dir", None))
612+
has_workspace = bool(getattr(self, "workspace_dir", None))
632613
files_total = 0
614+
has_engine = False
615+
compiling = False
616+
633617
files_sel = 0
634618
try:
635619
fl = getattr(self, "file_list", None)
@@ -639,32 +623,33 @@ def _short_path(path: str | None, max_len: int = 28) -> str:
639623
except Exception:
640624
pass
641625

642-
engine_name = _tr_ui(self, "Aucun", "None")
643626
try:
644627
tabs = getattr(self, "compiler_tabs", None)
645628
if tabs is not None and tabs.currentIndex() >= 0:
646-
engine_name = tabs.tabText(tabs.currentIndex())
629+
has_engine = True
647630
except Exception:
648631
pass
649632

650-
prog = ""
651633
try:
652-
pb = getattr(self, "progress", None)
653-
if pb is not None:
654-
prog = f"{pb.value()}%"
634+
compiling = bool(getattr(self, "processes", None)) or bool(
635+
getattr(self, "current_compiling", None)
636+
)
655637
except Exception:
656-
pass
657-
658-
parts = [
659-
f"{_tr_ui(self, 'Workspace', 'Workspace')}: {ws}",
660-
f"{_tr_ui(self, 'Fichiers', 'Files')}: {files_total}",
661-
f"{_tr_ui(self, 'Selection', 'Selected')}: {files_sel}",
662-
f"{_tr_ui(self, 'Moteur', 'Engine')}: {engine_name}",
663-
]
664-
if prog:
665-
parts.append(f"{_tr_ui(self, 'Progression', 'Progress')}: {prog}")
638+
compiling = False
639+
640+
if compiling:
641+
msg = _tr_ui(self, "Compilation en cours", "Build running")
642+
elif not has_workspace:
643+
msg = _tr_ui(self, "Pret", "Ready")
644+
elif files_total <= 0:
645+
msg = _tr_ui(self, "Workspace pret", "Workspace ready")
646+
elif not has_engine:
647+
msg = _tr_ui(self, "Selectionnez un moteur", "Select an engine")
648+
elif files_sel > 0:
649+
msg = _tr_ui(self, "Pret a compiler la selection", "Ready to build selection")
650+
else:
651+
msg = _tr_ui(self, "Pret a compiler", "Ready to build")
666652

667-
msg = " | ".join(parts)
668653
try:
669654
if getattr(self, "status_hint", None):
670655
self.status_hint.setText(msg)

0 commit comments

Comments
 (0)