def unload(self): for (signal, handlers) in self.__registered_signals.items(): for handler in handlers: signals.disconnect_signal(signal, handler)
def disconnect_signal(self, signal, func): # self.emit("signal_disconnect", signal, func) self.__unregister_signal(signal, func) return signals.disconnect_signal(signal, func)
def accepted_cb(time, id, *x): if id == int(argv[2]): print_notification(_("DCC action with id %(id)d accepted.") % {"id": id}) signals.disconnect_signal("dcc_send", accepted_cb)
def accepted_cb(time, id, *x): if id == int(argv[2]): print_notification( _("DCC action with id %(id)d accepted.") % {"id": id}) signals.disconnect_signal("dcc_send", accepted_cb)