From f08fcc68d33da8237f20c20e93470162c44d7077 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 21 Jan 2008 06:37:30 +0000 Subject: [PATCH] Only call a callback once for a specific method. --- deluge/ui/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/ui/client.py b/deluge/ui/client.py index b2b61db79..87a67986f 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -145,7 +145,8 @@ class CoreProxy(gobject.GObject): if _func is not None: if (func, args) in self._multi.get_call_list(): index = self._multi.get_call_list().index((func, args)) - self._callbacks[index].append(callback) + if callback not in self._callbacks[index]: + self._callbacks[index].append(callback) else: if len(args) == 0: _func()