diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-29 21:33:38 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-29 21:33:38 (GMT) |
commit | 0a9d68a41737f2a37cb51cf52625b5cdf2e51b16 (patch) | |
tree | eefbd13487c82e1e8dd1b9519166b710ca79076e | |
parent | 5c85d05a3add414b224e7880aae82736c098e80b (diff) |
Use (un)block instead of (dis)connect for signal handlers
-rw-r--r-- | Speak.activity/port/combobox.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Speak.activity/port/combobox.py b/Speak.activity/port/combobox.py index c68efc0..141ddf3 100644 --- a/Speak.activity/port/combobox.py +++ b/Speak.activity/port/combobox.py @@ -173,11 +173,15 @@ class ComboBox(gtk.ComboBox): continue try: if silent_cb: - self.disconnect_by_func(silent_cb) + try: + self.handler_block_by_func(silent_cb) + except Exception, e: + print e + silent_cb = None self.set_active(i) finally: if silent_cb: - self.connect('changed', silent_cb) + self.handler_unblock_by_func(silent_cb) break class ToolComboBox(gtk.ToolItem): |