From cec096be3b4dae9e16bd1022e11129777c692e4c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 1 Jun 2023 12:51:18 +0200 Subject: [PATCH] use error name in info title --- gui.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui.py b/gui.py index ab96b39..db17c81 100644 --- a/gui.py +++ b/gui.py @@ -73,8 +73,8 @@ class GUI: self.parent, text="Ouvrir un dossier", command=self._open_directory ).grid(column=1, row=1) - def _show_info(self, msg: str) -> None: - title = f"Contenu de l'avertissement - {self.name}" + def _show_info(self, name_err: str, msg: str) -> None: + title = f"{name_err} - {self.name}" info = Toplevel() info.resizable(False, False) info.title(title) @@ -107,7 +107,9 @@ class GUI: borderwidth=0, justify="left", anchor="w", - command=lambda: self._show_info(error.warning_content), + command=lambda: self._show_info( + error.warning_message, error.warning_content + ), ).grid(column=0, row=idx) idx += 1 else: