MCPcopy
hub / github.com/Sathvik-Rao/ClipCascade / TaskbarPanel

Class TaskbarPanel

ClipCascade_Desktop/src/cli/tray.py:19–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class TaskbarPanel:
20 def __init__(
21 self,
22 on_connect_callback: callable = None,
23 on_disconnect_callback: callable = None,
24 on_logoff_callback: callable = None,
25 new_version_available: list = None,
26 github_url: str = GITHUB_URL,
27 donation_url: str = None,
28 ws_interface=None, # type= interfaces.ws_interface.WSInterface
29 config: Config = None,
30 ):
31 self.on_connect_callback = on_connect_callback
32 self.on_disconnect_callback = on_disconnect_callback
33 self.on_logoff_callback = on_logoff_callback
34 self.new_version_available = new_version_available
35 self.github_url = github_url
36 self.donation_url = donation_url
37 self.ws_interface = ws_interface
38 self.config = config
39
40 self.is_disconnecting = False
41 self.disconnecting_items = None
42 self.is_file_download_enabled = False
43 self.file_download_items = None
44 self.previous_stats: str = ""
45 self.previous_stats_items = None
46
47 # Initial state: Connected
48 self.is_connected = True
49
50 self.menu_items = None
51 self.numbered_menu = None
52 self.loop_terminate = False
53
54 self.update_stats() # Start the stats update thread
55
56 def run(self):
57 Echo("-" * 53)
58 self.menu_items, self.numbered_menu = self.create_menu()
59
60 while not self.loop_terminate:
61 Echo("\n")
62
63 self.display_menu()
64
65 # input
66 choice = input("Choice: \n")
67 Echo("Please wait...")
68 if choice == "": # refresh
69 continue
70
71 if choice.isdigit():
72 choice = int(choice)
73 else:
74 Echo("Invalid choice. Please enter a number.")
75
76 if choice in self.numbered_menu:

Callers 1

runMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected