mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 06:58:42 +00:00
Only call a callback once for a specific method.
This commit is contained in:
parent
2a637c0b12
commit
f08fcc68d3
1 changed files with 2 additions and 1 deletions
|
@ -145,7 +145,8 @@ class CoreProxy(gobject.GObject):
|
||||||
if _func is not None:
|
if _func is not None:
|
||||||
if (func, args) in self._multi.get_call_list():
|
if (func, args) in self._multi.get_call_list():
|
||||||
index = self._multi.get_call_list().index((func, args))
|
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:
|
else:
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
_func()
|
_func()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue