mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Make sure 'quit and shutdown daemon' option is not visible when not connected to a daemon.
This commit is contained in:
parent
0c1dd44cd6
commit
f83e772030
1 changed files with 2 additions and 11 deletions
|
@ -488,19 +488,10 @@ class MenuBar(component.Component):
|
||||||
component.get("FilterTreeView").update()
|
component.get("FilterTreeView").update()
|
||||||
|
|
||||||
def _on_classic_mode(self, key, value):
|
def _on_classic_mode(self, key, value):
|
||||||
items = [
|
|
||||||
"menuitem_quitdaemon",
|
|
||||||
"separatormenuitem",
|
|
||||||
"menuitem_connectionmanager"
|
|
||||||
]
|
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
attr = "hide"
|
self.main_builder.get_object("menuitem_connectionmanager").hide()
|
||||||
else:
|
else:
|
||||||
attr = "show"
|
self.main_builder.get_object("menuitem_connectionmanager").show()
|
||||||
|
|
||||||
for item in items:
|
|
||||||
getattr(self.main_builder.get_object(item), attr)()
|
|
||||||
|
|
||||||
def _on_known_accounts(self, known_accounts):
|
def _on_known_accounts(self, known_accounts):
|
||||||
known_accounts_to_log = []
|
known_accounts_to_log = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue