diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-11-12 13:27:50 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-11-18 12:31:16 +0100 |
commit | 08af0bf2eca7289dc3f332aedc1650eca08c85f2 (patch) | |
tree | ca9c3ca74f3d3f71d02d171e605eab1426fcf6e4 /src | |
parent | 750b0803feb5604128e0a2e5771b5b8690529838 (diff) |
windows: make the systray reference local to OgWindowsOperations
Diffstat (limited to 'src')
-rw-r--r-- | src/windows/ogOperations.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/windows/ogOperations.py b/src/windows/ogOperations.py index c7161f7..b7763c4 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): |