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

Method run

ClipCascade_Desktop/src/core/application.py:274–309  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

272 Echo("*" * 53)
273
274 def run(self):
275 try:
276 self.banner()
277 self.setup_logging()
278 self.ensure_single_instance()
279 self.config.load()
280 self.authenticate_and_connect()
281 self.config.save()
282 update_available = self.get_version_update_status()
283 donation_url = self.get_donation_url()
284
285 sys_tray = TaskbarPanel(
286 on_connect_callback=self._get_ws_manager().manual_reconnect,
287 on_disconnect_callback=self._get_ws_manager().disconnect,
288 on_logoff_callback=self.logoff_and_exit,
289 new_version_available=update_available,
290 github_url=GITHUB_URL,
291 donation_url=donation_url,
292 ws_interface=self._get_ws_manager(),
293 config=self.config,
294 )
295 self._get_ws_manager().set_tray_ref(sys_tray)
296 sys_tray.run()
297 except Exception as e:
298 msg = f"An unexpected error has occurred: {e}"
299 logging.error(msg)
300 CustomDialog(
301 msg + "\nCheck logs in project directory", msg_type="error"
302 ).mainloop()
303 finally:
304 self._get_ws_manager().disconnect()
305 if PLATFORM == MACOS or PLATFORM.startswith(LINUX):
306 if self.lock_file is not None:
307 fcntl.flock(self.lock_file, fcntl.LOCK_UN)
308 self.lock_file.close()
309 os.remove(self.mutex_identifier)

Callers

nothing calls this directly

Calls 15

bannerMethod · 0.95
setup_loggingMethod · 0.95
get_donation_urlMethod · 0.95
_get_ws_managerMethod · 0.95
runMethod · 0.95
TaskbarPanelClass · 0.90
CustomDialogClass · 0.90
loadMethod · 0.80
saveMethod · 0.80

Tested by

no test coverage detected