From 9238fab360a1fbe3ca8ec94ec45fcecb0f3f3b2b Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 6 Jul 2009 06:51:54 +0000 Subject: [PATCH] Likewise for Windows close/shutdown events --- deluge/ui/gtkui/gtkui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index f7e83a9af..1591cee94 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -152,8 +152,8 @@ class GtkUI: from win32con import CTRL_SHUTDOWN_EVENT def win_handler(ctrl_type): log.debug("ctrl_type: %s", ctrl_type) - if ctrl_type == CTRL_CLOSE_EVENT or ctrl_type == CTRL_SHUTDOWN_EVENT: - self.shutdown() + if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT): + gtk.main_quit() return 1 SetConsoleCtrlHandler(win_handler)