Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 907:cd02f5ef30df
primitivus: display chat states (with symbols) for MUC participants
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 17 Mar 2014 13:24:55 +0100 |
parents | 30fd34309949 |
children | b12706d164d7 |
comparison
equal
deleted
inserted
replaced
906:1cbae66fa725 | 907:cd02f5ef30df |
---|---|
602 def onAboutRequest(self, menu): | 602 def onAboutRequest(self, menu): |
603 self.showPopUp(sat_widgets.Alert(_("About"), Const.APP_NAME + " v" + self.bridge.getVersion(), ok_cb=self.removePopUp)) | 603 self.showPopUp(sat_widgets.Alert(_("About"), Const.APP_NAME + " v" + self.bridge.getVersion(), ok_cb=self.removePopUp)) |
604 | 604 |
605 #MISC CALLBACKS# | 605 #MISC CALLBACKS# |
606 | 606 |
607 def chatStateReceived(self, from_jid_s, state, profile): | |
608 """Signal observer to display a contact chat state | |
609 @param from_jid_s: contact who sent his new state | |
610 @state: state | |
611 @profile: current profile | |
612 """ | |
613 if not self.check_profile(profile): | |
614 return | |
615 | |
616 if from_jid_s == "@ALL@": | |
617 for win in self.chat_wins: | |
618 self.chat_wins[win].updateChatState(state) | |
619 return | |
620 | |
621 from_bare = JID(from_jid_s).bare | |
622 if from_bare in self.chat_wins: | |
623 self.chat_wins[from_bare].updateChatState(state) | |
624 | |
625 def setStatusOnline(self, online=True, show="", statuses={}): | 607 def setStatusOnline(self, online=True, show="", statuses={}): |
626 if not online or not statuses: | 608 if not online or not statuses: |
627 return | 609 return |
628 try: | 610 try: |
629 self.status_bar.setPresenceStatus(show, statuses['default']) | 611 self.status_bar.setPresenceStatus(show, statuses['default']) |