Calum Lind : Fix #2175 : systemtray free variable self referenced before assignment

0 views
Skip to first unread message

g...@deluge-torrent.org

unread,
Dec 15, 2012, 4:28:51 PM12/15/12
to deluge...@googlegroups.com
Module: deluge
Branch: 1.3-stable
Commit: 5ecc580463c890eae32915ea1cb908b108a5bd39

Author: Calum Lind <calumlin...@gmail.com>
Date: Mon Dec 10 18:59:55 2012 +0000

Fix #2175 : systemtray free variable self referenced before assignment

This is only the likely fix for the issue as I have been unable to reproduce it.

---

deluge/ui/gtkui/systemtray.py | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py
index 933cb24..6f9d100 100644
--- a/deluge/ui/gtkui/systemtray.py
+++ b/deluge/ui/gtkui/systemtray.py
@@ -450,13 +450,13 @@ class SystemTray(component.Component):
entered_pass.set_width_chars(25)
entered_pass.set_visibility(False)

- tray_lock = gtk.Dialog(title="", parent=self.window.window,
+ self.tray_lock = gtk.Dialog(title="", parent=self.window.window,
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK,
gtk.RESPONSE_OK))
- tray_lock.set_default_response(gtk.RESPONSE_OK)
- tray_lock.set_has_separator(False)
+ self.tray_lock.set_default_response(gtk.RESPONSE_OK)
+ self.tray_lock.set_has_separator(False)

- tray_lock.set_border_width(5)
+ self.tray_lock.set_border_width(5)

hbox = gtk.HBox(spacing=5)

@@ -481,15 +481,15 @@ class SystemTray(component.Component):

vbox.pack_start(entered_pass)

- tray_lock.vbox.pack_start(hbox)
+ self.tray_lock.vbox.pack_start(hbox)

def on_response(dialog, response_id):
if response_id == gtk.RESPONSE_OK:
if self.config["tray_password"] == sha_hash(entered_pass.get_text()).hexdigest():
self.window.present()

- tray_lock.destroy()
+ self.tray_lock.destroy()
is_showing_dlg[0] = False

- tray_lock.connect("response", on_response)
- tray_lock.show_all()
+ self.tray_lock.connect("response", on_response)
+ self.tray_lock.show_all()

g...@deluge-torrent.org

unread,
Dec 15, 2012, 4:28:51 PM12/15/12
to deluge...@googlegroups.com
Module: deluge
Branch: master
Commit: 725230dc81c7ecfec0cc1f45b925700b5d180d08

Author: Calum Lind <calumlin...@gmail.com>
Date: Mon Dec 10 18:59:55 2012 +0000

Fix #2175 : systemtray free variable self referenced before assignment

This is only the likely fix for the issue as I have been unable to reproduce it.

---

deluge/ui/gtkui/systemtray.py | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py
index 0c5c104..553ebb3 100644
--- a/deluge/ui/gtkui/systemtray.py
+++ b/deluge/ui/gtkui/systemtray.py
@@ -445,13 +445,13 @@ class SystemTray(component.Component):
entered_pass.set_width_chars(25)
entered_pass.set_visibility(False)

- tray_lock = gtk.Dialog(title="", parent=self.window.window,
+ self.tray_lock = gtk.Dialog(title="", parent=self.window.window,
buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK,
gtk.RESPONSE_OK))
- tray_lock.set_default_response(gtk.RESPONSE_OK)
- tray_lock.set_has_separator(False)
+ self.tray_lock.set_default_response(gtk.RESPONSE_OK)
+ self.tray_lock.set_has_separator(False)

- tray_lock.set_border_width(5)
+ self.tray_lock.set_border_width(5)

hbox = gtk.HBox(spacing=5)

@@ -476,15 +476,15 @@ class SystemTray(component.Component):
Reply all
Reply to author
Forward
0 new messages