-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
46 lines (38 loc) · 1.26 KB
/
Copy pathmain.py
File metadata and controls
46 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python3
"""
Gource GUI - A graphical interface for Gource version control visualization
"""
import sys
import tkinter as tk
from tkinter import messagebox
import traceback
# Add project root to path
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from gui.main_window_with_video import GourceGUIApp
def main():
"""Main entry point for the application"""
try:
# Create main window
root = tk.Tk()
# Set application icon and basic properties
root.title("Gource GUI")
root.geometry("900x700")
root.minsize(800, 600)
# Center window on screen
root.update_idletasks()
x = (root.winfo_screenwidth() // 2) - (900 // 2)
y = (root.winfo_screenheight() // 2) - (700 // 2)
root.geometry(f"900x700+{x}+{y}")
# Create and run application
app = GourceGUIApp(root)
root.mainloop()
except Exception as e:
error_msg = f"Failed to start Gource GUI:\n\n{str(e)}\n\nError details:\n{traceback.format_exc()}"
try:
messagebox.showerror("Startup Error", error_msg)
except:
print(error_msg, file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":
main()