mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-07 17:08:42 +00:00
Likewise for Windows close/shutdown events
This commit is contained in:
parent
594bc7cb9f
commit
9238fab360
1 changed files with 2 additions and 2 deletions
|
@ -152,8 +152,8 @@ class GtkUI:
|
||||||
from win32con import CTRL_SHUTDOWN_EVENT
|
from win32con import CTRL_SHUTDOWN_EVENT
|
||||||
def win_handler(ctrl_type):
|
def win_handler(ctrl_type):
|
||||||
log.debug("ctrl_type: %s", ctrl_type)
|
log.debug("ctrl_type: %s", ctrl_type)
|
||||||
if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT:
|
if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT):
|
||||||
self.shutdown()
|
gtk.main_quit()
|
||||||
return 1
|
return 1
|
||||||
SetConsoleCtrlHandler(win_handler)
|
SetConsoleCtrlHandler(win_handler)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue