Unifica finestre errori con testo completo, copia ed esportazione

This commit is contained in:
2026-10-23 10:57:35 +02:00
parent fc43cbb7ec
commit 9d87b07648
24 changed files with 570 additions and 66 deletions

View File

@@ -4,7 +4,8 @@ from __future__ import annotations
import tkinter as tk
from datetime import datetime
from tkinter import filedialog, messagebox, ttk
import error_dialog as messagebox
from tkinter import filedialog, ttk
from typing import Any
import customtkinter as ctk
@@ -399,6 +400,7 @@ class DiagnosticaWindow(ctk.CTkToplevel):
loc_text("diagnostics.title", catalog=self._locale_catalog, default="Diagnostica"),
str(exc),
parent=self if self._is_alive() else None,
exception=exc,
)
def _on_loaded(self, res: dict[str, Any] | None) -> None:
@@ -434,6 +436,7 @@ class DiagnosticaWindow(ctk.CTkToplevel):
loc_text("diagnostics.title", catalog=self._locale_catalog, default="Diagnostica"),
str(exc),
parent=self,
exception=exc,
)
def _on_error(self, exc: BaseException) -> None:
@@ -446,6 +449,7 @@ class DiagnosticaWindow(ctk.CTkToplevel):
loc_text("diagnostics.title", catalog=self._locale_catalog, default="Diagnostica"),
str(exc),
parent=self,
exception=exc,
)
def _export_xlsx(self) -> None:
@@ -477,6 +481,7 @@ class DiagnosticaWindow(ctk.CTkToplevel):
default="Per l'esportazione serve 'openpyxl' (pip install openpyxl).",
).format(error=exc),
parent=self,
exception=exc,
)
return
@@ -531,6 +536,7 @@ class DiagnosticaWindow(ctk.CTkToplevel):
default="Errore durante l'esportazione:\n{error}",
).format(error=exc),
parent=self,
exception=exc,
)