Only call a callback once for a specific method.

This commit is contained in:
Andrew Resch 2008-01-21 06:37:30 +00:00
parent 2a637c0b12
commit f08fcc68d3
1 changed files with 2 additions and 1 deletions

View File

@ -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()