mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-29 20:56:31 +00:00
alter signal handling shutdown
This commit is contained in:
parent
c067cbe4bd
commit
3b2d205866
@ -144,14 +144,14 @@ class DelugeGTK:
|
||||
try:
|
||||
import gnome.ui
|
||||
self.client = gnome.ui.Client()
|
||||
self.client.connect("save_yourself", self.manager.quit)
|
||||
self.client.connect("save_yourself", self.shutdown)
|
||||
except:
|
||||
pass
|
||||
|
||||
signal.signal(signal.SIGINT, self.manager.quit)
|
||||
signal.signal(signal.SIGTERM, self.manager.quit)
|
||||
signal.signal(signal.SIGINT, self.shutdown)
|
||||
signal.signal(signal.SIGTERM, self.shutdown)
|
||||
if not common.windows_check():
|
||||
signal.signal(signal.SIGHUP, self.manager.quit)
|
||||
signal.signal(signal.SIGHUP, self.shutdown)
|
||||
else:
|
||||
from win32api import SetConsoleCtrlHandler
|
||||
from win32con import CTRL_CLOSE_EVENT
|
||||
|
Loading…
x
Reference in New Issue
Block a user