comparison frontends/src/quick_frontend/quick_app.py @ 2024:01aff34e8873

quick frontends, primitivus: messageState signal handling
author Goffi <goffi@goffi.org>
date Tue, 02 Aug 2016 23:11:44 +0200
parents f09562b0704d
children 48a61879f9ef
comparison
equal deleted inserted replaced
2023:224c8b0886bc 2024:01aff34e8873
252 self.registerSignal("mucRoomJoined", iface="plugin") 252 self.registerSignal("mucRoomJoined", iface="plugin")
253 self.registerSignal("mucRoomLeft", iface="plugin") 253 self.registerSignal("mucRoomLeft", iface="plugin")
254 self.registerSignal("mucRoomUserChangedNick", iface="plugin") 254 self.registerSignal("mucRoomUserChangedNick", iface="plugin")
255 self.registerSignal("mucRoomNewSubject", iface="plugin") 255 self.registerSignal("mucRoomNewSubject", iface="plugin")
256 self.registerSignal("chatStateReceived", iface="plugin") 256 self.registerSignal("chatStateReceived", iface="plugin")
257 self.registerSignal("messageState", iface="plugin")
257 self.registerSignal("psEvent", iface="plugin") 258 self.registerSignal("psEvent", iface="plugin")
258 259
259 # FIXME: do it dynamically 260 # FIXME: do it dynamically
260 quick_games.Tarot.registerSignals(self) 261 quick_games.Tarot.registerSignals(self)
261 quick_games.Quiz.registerSignals(self) 262 quick_games.Quiz.registerSignals(self)
489 490
490 # we display the message in the widget 491 # we display the message in the widget
491 492
492 chat_widget.messageNew(uid, timestamp, from_jid, target, msg, subject, type_, extra, profile) 493 chat_widget.messageNew(uid, timestamp, from_jid, target, msg, subject, type_, extra, profile)
493 494
495 def messageStateHandler(self, uid, status, profile):
496 for widget in self.widgets.getWidgets(quick_chat.QuickChat, profiles=(profile,)):
497 widget.onMessageState(uid, status, profile)
498
494 def messageSend(self, to_jid, message, subject=None, mess_type="auto", extra=None, callback=None, errback=None, profile_key=C.PROF_KEY_NONE): 499 def messageSend(self, to_jid, message, subject=None, mess_type="auto", extra=None, callback=None, errback=None, profile_key=C.PROF_KEY_NONE):
495 if subject is None: 500 if subject is None:
496 subject = {} 501 subject = {}
497 if extra is None: 502 if extra is None:
498 extra = {} 503 extra = {}