From 665df8fa799b267f87bc9d0254efaf152d875f27 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 12 Nov 2024 13:27:50 +0100 Subject: windows: make the systray reference local to OgWindowsOperations --- src/windows/ogOperations.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/windows') diff --git a/src/windows/ogOperations.py b/src/windows/ogOperations.py index bd88852..62a38b0 100644 --- a/src/windows/ogOperations.py +++ b/src/windows/ogOperations.py @@ -61,25 +61,23 @@ def create_systray(): icon.run() -systray_p = Process(target=create_systray) - - class OgWindowsOperations: def __init__(self): freeze_support() mp.set_start_method('spawn') - systray_p.start() + self.systray_p = Process(target=create_systray) + self.systray_p.start() def _restartBrowser(self, url): raise OgError('Function not implemented') def poweroff(self): - systray_p.terminate() + self.systray_p.terminate() os.system('shutdown -s -t 0') def reboot(self): - systray_p.terminate() + self.systray_p.terminate() os.system('shutdown -r -t 0') def shellrun(self, request, ogRest): -- cgit v1.2.3-18-g5258