Author: andar

Revision: 5702

Log:
        Hide the 'Open File' menu option when connected to a remote daemon

Diff:
Modified: trunk/deluge/ui/gtkui/files_tab.py
===================================================================
--- trunk/deluge/ui/gtkui/files_tab.py  2009-08-21 01:06:22 UTC (rev 5701)
+++ trunk/deluge/ui/gtkui/files_tab.py  2009-08-23 20:46:31 UTC (rev 5702)
@@ -181,6 +181,11 @@
             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 @@
 
         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



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to