remove parts comments

This commit is contained in:
2025-06-06 22:16:42 +02:00
parent 640c75e42a
commit 6e9b6a3693

View File

@ -1,5 +1,4 @@
#!/usr/bin/python3 #!/usr/bin/python3
################### Teil 1 - Imports und Basis-Konfiguration ###################
import gettext import gettext
import locale import locale
import tkinter as tk import tkinter as tk
@ -17,7 +16,6 @@ from pathlib import Path
from datetime import datetime from datetime import datetime
################### Teil 2 - LXTools App Configuration ###################
class LXToolsAppConfig: class LXToolsAppConfig:
VERSION = "1.1.3" VERSION = "1.1.3"
APP_NAME = "LX Tools Installer" APP_NAME = "LX Tools Installer"
@ -124,9 +122,6 @@ class LXToolsAppConfig:
_ = LXToolsAppConfig.setup_translations() _ = LXToolsAppConfig.setup_translations()
# ----------------------------
# Color Manager Class (NEU für einheitliche Farben)
# ----------------------------
class ColorManager: class ColorManager:
@staticmethod @staticmethod
def get_system_colors(root): def get_system_colors(root):
@ -173,9 +168,6 @@ class ColorManager:
} }
# ----------------------------
# Theme Manager Class
# ----------------------------
class ThemeManager: class ThemeManager:
@staticmethod @staticmethod
def apply_light_theme(root): def apply_light_theme(root):
@ -207,7 +199,6 @@ class ThemeManager:
return False return False
################### Teil 3 - OS Detection und System Manager ###################
class OSDetector: class OSDetector:
@staticmethod @staticmethod
def detect_os(): def detect_os():
@ -319,7 +310,6 @@ class SystemManager:
return False return False
################### Teil 4 - Image Manager und Gitea API ###################
class ImageManager: class ImageManager:
def __init__(self): def __init__(self):
self.images = {} self.images = {}
@ -416,7 +406,6 @@ class NetworkChecker:
return False return False
################### Teil 5 - Download Manager ###################
class DownloadManager: class DownloadManager:
@staticmethod @staticmethod
def download_and_extract(url, extract_to, progress_callback=None): def download_and_extract(url, extract_to, progress_callback=None):
@ -443,7 +432,6 @@ class DownloadManager:
return False return False
################### Teil 6 - App Manager ###################
class AppManager: class AppManager:
def __init__(self): def __init__(self):
self.projects = LXToolsAppConfig.PROJECTS self.projects = LXToolsAppConfig.PROJECTS
@ -539,7 +527,6 @@ class AppManager:
) )
################### Teil 7 - Installation Manager ###################
class InstallationManager: class InstallationManager:
def __init__( def __init__(
self, app_manager, progress_callback=None, icon_callback=None, log_callback=None self, app_manager, progress_callback=None, icon_callback=None, log_callback=None
@ -695,7 +682,6 @@ echo "Wire-Py installation completed!"
""" """
return script return script
################### Teil 8 - Installation Manager LogViewer Script ###################
def _create_logviewer_install_script(self): def _create_logviewer_install_script(self):
"""Create LogViewer installation script""" """Create LogViewer installation script"""
script = f"""#!/bin/bash script = f"""#!/bin/bash
@ -841,7 +827,6 @@ echo "LogViewer installation completed!"
self.log_callback(message) self.log_callback(message)
################### Teil 9 - Uninstallation Manager ###################
class UninstallationManager: class UninstallationManager:
def __init__(self, app_manager, progress_callback=None, log_callback=None): def __init__(self, app_manager, progress_callback=None, log_callback=None):
self.app_manager = app_manager self.app_manager = app_manager
@ -1005,7 +990,6 @@ echo "LogViewer uninstallation completed!"
""" """
return script return script
################### Teil 10 - Uninstallation Manager Helper Methods ###################
def _execute_uninstall_script(self, script_content): def _execute_uninstall_script(self, script_content):
"""Execute uninstallation script with pkexec""" """Execute uninstallation script with pkexec"""
try: try:
@ -1053,7 +1037,6 @@ echo "LogViewer uninstallation completed!"
self.log_callback(message) self.log_callback(message)
################### Teil 11 - LXToolsGUI Klasse (Hauptklasse) ###################
class LXToolsGUI: class LXToolsGUI:
def __init__(self): def __init__(self):
self.root = None self.root = None
@ -1219,7 +1202,6 @@ class LXToolsGUI:
else: else:
self.update_header_status("System checking...", "#3498db") # Blau self.update_header_status("System checking...", "#3498db") # Blau
################### Teil 12 - GUI Projects Tab ###################
def _create_projects_tab(self): def _create_projects_tab(self):
"""Create projects tab with project cards""" """Create projects tab with project cards"""
projects_frame = ttk.Frame(self.notebook) projects_frame = ttk.Frame(self.notebook)
@ -1358,7 +1340,6 @@ class LXToolsGUI:
# Make icon clickable too # Make icon clickable too
self._make_clickable(icon_label, content_frame, project_key) self._make_clickable(icon_label, content_frame, project_key)
################### Teil 13 - GUI Card Interaction Methods ###################
def _make_clickable(self, widget, main_frame, project_key): def _make_clickable(self, widget, main_frame, project_key):
"""Make widget clickable with hover effects""" """Make widget clickable with hover effects"""
@ -1417,7 +1398,6 @@ class LXToolsGUI:
project_info = self.app_manager.get_project_info(project_key) project_info = self.app_manager.get_project_info(project_key)
self.log_message(f"Selected project: {project_info['name']}") self.log_message(f"Selected project: {project_info['name']}")
################### Teil 14 - GUI Log Tab und Progress Section ###################
def _create_log_tab(self): def _create_log_tab(self):
"""Create log tab""" """Create log tab"""
log_frame = ttk.Frame(self.notebook) log_frame = ttk.Frame(self.notebook)
@ -1490,7 +1470,6 @@ class LXToolsGUI:
# Initial icon load (neutral) # Initial icon load (neutral)
self._reset_download_icon() self._reset_download_icon()
################### Teil 15 - GUI Buttons and Icon Management ###################
def _create_modern_buttons(self): def _create_modern_buttons(self):
"""Create modern styled buttons""" """Create modern styled buttons"""
button_frame = tk.Frame(self.root, bg=self.colors["bg"]) button_frame = tk.Frame(self.root, bg=self.colors["bg"])
@ -1590,7 +1569,6 @@ class LXToolsGUI:
else: else:
self.download_icon_label.config(text="📥", font=("Helvetica", 16)) self.download_icon_label.config(text="📥", font=("Helvetica", 16))
################### Teil 16 - GUI Status Management ###################
def refresh_status(self): def refresh_status(self):
"""Refresh application status and version information""" """Refresh application status and version information"""
self.update_progress("Refreshing status and checking versions...") self.update_progress("Refreshing status and checking versions...")
@ -1666,7 +1644,6 @@ class LXToolsGUI:
self.log_message("=== Status refresh completed ===") self.log_message("=== Status refresh completed ===")
self.check_ready_status() self.check_ready_status()
################### Teil 17 - GUI Action Methods ###################
def install_selected(self): def install_selected(self):
"""Handle install button click""" """Handle install button click"""
if not self.selected_project: if not self.selected_project:
@ -1766,7 +1743,6 @@ class LXToolsGUI:
messagebox.showerror("Error", f"Uninstallation failed: {e}") messagebox.showerror("Error", f"Uninstallation failed: {e}")
self.root.focus_set() self.root.focus_set()
################### Teil 18 - GUI Helper Methods ###################
def update_progress(self, message): def update_progress(self, message):
"""Update progress message""" """Update progress message"""
if self.progress_label: if self.progress_label:
@ -1796,7 +1772,6 @@ class LXToolsGUI:
root.mainloop() root.mainloop()
################### Teil 19 - TKinter Check und Main Function ###################
def check_and_install_tkinter(): def check_and_install_tkinter():
"""Check if tkinter is available and install if needed""" """Check if tkinter is available and install if needed"""
if not OSDetector.check_tkinter_available(): if not OSDetector.check_tkinter_available():