feat: Add about dialog with program information in help menu
- Added Help menu with "About this program" option - Displays company (Webfarben), developer (Sebastian Köhler), contact email - Shows Git repository URL and current software version - About dialog accessible from menu bar
This commit is contained in:
35
gui.py
35
gui.py
@@ -37,6 +37,9 @@ class PDFtoICSGUI:
|
|||||||
# Variablen
|
# Variablen
|
||||||
self.pdf_files = []
|
self.pdf_files = []
|
||||||
|
|
||||||
|
# Erstelle Menüleiste
|
||||||
|
self.create_menu()
|
||||||
|
|
||||||
# Nutze letztes Ausgabeverzeichnis oder Standard
|
# Nutze letztes Ausgabeverzeichnis oder Standard
|
||||||
default_dir = self.config.get('last_output_dir', None)
|
default_dir = self.config.get('last_output_dir', None)
|
||||||
if not default_dir or not Path(default_dir).exists():
|
if not default_dir or not Path(default_dir).exists():
|
||||||
@@ -246,6 +249,38 @@ class PDFtoICSGUI:
|
|||||||
print(f"Warnung: Konfiguration konnte nicht geladen werden: {e}")
|
print(f"Warnung: Konfiguration konnte nicht geladen werden: {e}")
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
def create_menu(self):
|
||||||
|
"""Erstelle die Menüleiste"""
|
||||||
|
menubar = tk.Menu(self.root)
|
||||||
|
self.root.config(menu=menubar)
|
||||||
|
|
||||||
|
# Hilfe-Menü
|
||||||
|
help_menu = tk.Menu(menubar, tearoff=0)
|
||||||
|
menubar.add_cascade(label="Hilfe", menu=help_menu)
|
||||||
|
help_menu.add_command(label="Über dieses Programm", command=self.show_about_dialog)
|
||||||
|
help_menu.add_separator()
|
||||||
|
help_menu.add_command(label="Beenden", command=self.on_closing)
|
||||||
|
|
||||||
|
def show_about_dialog(self):
|
||||||
|
"""Zeige About-Dialog mit Programminformationen"""
|
||||||
|
version = get_current_version()
|
||||||
|
about_text = f"""PDF zu ICS Konverter - Dienstplan Importer
|
||||||
|
Version {version}
|
||||||
|
|
||||||
|
Entwickler: Sebastian Köhler
|
||||||
|
Firma: Webfarben
|
||||||
|
Kontakt: kontakt@webfarben.de
|
||||||
|
|
||||||
|
Git Repository:
|
||||||
|
https://git.file-archive.de/webfarben/pdf_to_ics.git
|
||||||
|
|
||||||
|
Ein Programm zur Konvertierung von Dienstplan-PDFs
|
||||||
|
zu ICS-Kalenderdateien für einfaches Importieren
|
||||||
|
in Kalenderprogramme."""
|
||||||
|
|
||||||
|
messagebox.showinfo("Über dieses Programm", about_text)
|
||||||
|
|
||||||
|
|
||||||
def save_config(self):
|
def save_config(self):
|
||||||
"""Speichere Konfiguration"""
|
"""Speichere Konfiguration"""
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user