Initial commit
Dieser Commit ist enthalten in:
54
main.py
Normale Datei
54
main.py
Normale Datei
@ -0,0 +1,54 @@
|
||||
"""
|
||||
Claude Project Manager
|
||||
Main entry point for the application
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add project root to path
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from gui.main_window import MainWindow
|
||||
from utils.logger import logger
|
||||
|
||||
def main():
|
||||
"""Main application entry point"""
|
||||
logger.info("Starting Claude Project Manager")
|
||||
try:
|
||||
# Import and set theme first
|
||||
import json
|
||||
from gui.styles import set_theme
|
||||
import customtkinter as ctk
|
||||
|
||||
# Load theme preference before creating UI
|
||||
settings_file = os.path.join(os.path.dirname(__file__), "data/settings.json")
|
||||
theme = 'dark' # Default
|
||||
|
||||
try:
|
||||
if os.path.exists(settings_file):
|
||||
with open(settings_file, 'r') as f:
|
||||
settings = json.load(f)
|
||||
if 'theme' in settings:
|
||||
theme = settings['theme']
|
||||
except:
|
||||
pass
|
||||
|
||||
# Set theme before UI creation
|
||||
ctk.set_appearance_mode(theme)
|
||||
set_theme(theme)
|
||||
|
||||
# Create and run the application
|
||||
app = MainWindow()
|
||||
logger.info("Application window created, starting main loop")
|
||||
app.run()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error starting application: {e}")
|
||||
print(f"Error starting application: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
input("Press Enter to exit...")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren