From ac483482b6b1bea8778e34653c717759d3becd80 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 8 Jul 2007 20:54:31 +0000 Subject: [PATCH] tray toggle preferences - plisk --- glade/preferences_dialog.glade | 1 + src/dialogs.py | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index 4e8eca460..8c8d1a208 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -1234,6 +1234,7 @@ HTTP W/ Auth 0 True True + diff --git a/src/dialogs.py b/src/dialogs.py index 8e9a33e04..8903cd8f8 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -40,7 +40,7 @@ class PreferencesDlg: self.dialog = self.glade.get_widget("pref_dialog") self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png")) self.glade.signal_autoconnect({ - 'tray_toggle': self.tray_toggle, + 'on_chk_use_tray_toggled': self.tray_toggle, 'on_btn_testport_clicked': self.TestPort, }) self.parent = parent @@ -138,11 +138,12 @@ class PreferencesDlg: common.open_url_in_browser(self.dialog,'http://www.deluge-torrent.org/test-port.php?port=%s' %activep) - def tray_toggle(self, obj): - if obj.get_active(): - self.glade.get_widget("chk_min_on_close").set_sensitive(True) - else: - self.glade.get_widget("chk_min_on_close").set_sensitive(False) + def tray_toggle(self, widget): + is_active = widget.get_active() + + self.glade.get_widget("chk_min_on_close").set_sensitive(is_active) + self.glade.get_widget("chk_lock_tray").set_sensitive(is_active) + self.glade.get_widget("txt_tray_passwd").set_sensitive(is_active) class PluginDlg: