From 7e7944a085c2e98a2159372d09a060085ffd690f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 21 Feb 2009 14:03:28 +0000 Subject: [PATCH] Fix "quit and shutdown daemon" option --- deluge/ui/gtkui/menubar.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py index 7b02f66ba..bffeea417 100644 --- a/deluge/ui/gtkui/menubar.py +++ b/deluge/ui/gtkui/menubar.py @@ -248,8 +248,9 @@ class MenuBar(component.Component): def on_menuitem_quitdaemon_activate(self, data=None): log.debug("on_menuitem_quitdaemon_activate") # Tell the core to shutdown - client.daemon.shutdown() - self.window.quit() + def on_shutdown(result): + self.window.quit() + client.daemon.shutdown().addCallback(on_shutdown) def on_menuitem_quit_activate(self, data=None): log.debug("on_menuitem_quit_activate")