mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 09:58:39 +00:00
tweak last
This commit is contained in:
parent
eb7db72965
commit
05b105276e
1 changed files with 4 additions and 0 deletions
|
@ -152,10 +152,14 @@ class DelugeGTK:
|
||||||
else:
|
else:
|
||||||
from win32api import SetConsoleCtrlHandler
|
from win32api import SetConsoleCtrlHandler
|
||||||
from win32con import CTRL_CLOSE_EVENT
|
from win32con import CTRL_CLOSE_EVENT
|
||||||
|
result = 0
|
||||||
def win_handler(self, ctrl_type):
|
def win_handler(self, ctrl_type):
|
||||||
if ctrl_type == CTRL_CLOSE_EVENT:
|
if ctrl_type == CTRL_CLOSE_EVENT:
|
||||||
self.shutdown()
|
self.shutdown()
|
||||||
|
result = 1
|
||||||
SetConsoleCtrlHandler(win_handler)
|
SetConsoleCtrlHandler(win_handler)
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
self.dht_timer = 0
|
self.dht_timer = 0
|
||||||
self.dht_skip = False
|
self.dht_skip = False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue