From f83e77203015d2ab763d56d9643f11538771acad Mon Sep 17 00:00:00 2001 From: Chase Sterling Date: Fri, 16 Nov 2012 00:46:00 -0500 Subject: [PATCH] Make sure 'quit and shutdown daemon' option is not visible when not connected to a daemon. --- deluge/ui/gtkui/menubar.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py index 23c7472e4..aebab1466 100644 --- a/deluge/ui/gtkui/menubar.py +++ b/deluge/ui/gtkui/menubar.py @@ -488,19 +488,10 @@ class MenuBar(component.Component): component.get("FilterTreeView").update() def _on_classic_mode(self, key, value): - items = [ - "menuitem_quitdaemon", - "separatormenuitem", - "menuitem_connectionmanager" - ] - if value: - attr = "hide" + self.main_builder.get_object("menuitem_connectionmanager").hide() else: - attr = "show" - - for item in items: - getattr(self.main_builder.get_object(item), attr)() + self.main_builder.get_object("menuitem_connectionmanager").show() def _on_known_accounts(self, known_accounts): known_accounts_to_log = []