mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Hide the 'Open File' menu option when connected to a remote daemon
This commit is contained in:
parent
df72c38f22
commit
00882ac867
1 changed files with 10 additions and 0 deletions
|
@ -181,6 +181,11 @@ class FilesTab(Tab):
|
|||
glade.get_widget("menuitem_priority_sep")
|
||||
]
|
||||
|
||||
self.localhost_widgets = [
|
||||
glade.get_widget("menuitem_open_file"),
|
||||
glade.get_widget("menuitem3")
|
||||
]
|
||||
|
||||
self.listview.connect("row-activated", self._on_row_activated)
|
||||
self.listview.connect("button-press-event", self._on_button_press_event)
|
||||
|
||||
|
@ -215,6 +220,11 @@ class FilesTab(Tab):
|
|||
|
||||
self.torrent_id = None
|
||||
|
||||
def start(self):
|
||||
attr = "hide" if not client.is_localhost() else "show"
|
||||
for widget in self.localhost_widgets:
|
||||
getattr(widget, attr)()
|
||||
|
||||
def save_state(self):
|
||||
filename = "files_tab.state"
|
||||
# Get the current sort order of the view
|
||||
|
|
Loading…
Add table
Reference in a new issue