Skip to content

Commit 75076b9

Browse files
Suggestions from Gagandeep-2003#70 applied
1 parent 4478282 commit 75076b9

File tree

1 file changed

+38
-11
lines changed

1 file changed

+38
-11
lines changed

Sesssion_analysis.py

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,45 @@
11
import tkinter as tk
22
from tkinter import ttk
3-
from tkinter.ttk import *
43

5-
root = tk.Tk()
6-
root.geometry('600x400')
7-
root.title("Tab Widget")
4+
# Constants
5+
WINDOW_SIZE = "600x400"
6+
APP_TITLE = "Session Analysis"
87

9-
notebook = ttk.Notebook(root)
10-
live_track = ttk.Frame(notebook)
11-
session_his = ttk.Frame(notebook)
12-
notebook.add(live_track, text = 'Live Tracking')
13-
notebook.add(session_his, text = 'Session History')
148

15-
notebook.pack()
9+
def build_live_tracking_tab(parent):
10+
"""Build the Live Tracking tab interface."""
11+
frame = ttk.Frame(parent, padding=10)
12+
ttk.Label(frame, text="Live Tracking — TODO").pack(anchor="w")
13+
# TODO: Add live tracking functionality here
14+
return frame
1615

1716

18-
root.mainloop()
17+
def build_session_history_tab(parent):
18+
"""Build the Session History tab interface."""
19+
frame = ttk.Frame(parent, padding=10)
20+
ttk.Label(frame, text="Session History — TODO").pack(anchor="w")
21+
# TODO: Add session history functionality here
22+
return frame
23+
24+
25+
def main():
26+
"""Main application entry point."""
27+
root = tk.Tk()
28+
root.geometry(WINDOW_SIZE)
29+
root.title(APP_TITLE)
30+
31+
notebook = ttk.Notebook(root)
32+
33+
# Build tabs using helper functions
34+
live_track = build_live_tracking_tab(notebook)
35+
session_his = build_session_history_tab(notebook)
36+
37+
notebook.add(live_track, text="Live Tracking")
38+
notebook.add(session_his, text="Session History")
39+
notebook.pack(expand=True, fill="both")
40+
41+
root.mainloop()
42+
43+
44+
if __name__ == "__main__":
45+
main()

0 commit comments

Comments
 (0)