Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 917:a9401694d2dc
bridge, frontends: display presence with the highest priority + reset your own presence when you (dis)connect
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 20 Mar 2014 21:18:18 +0100 |
parents | d08cbdd566e2 |
children | 3a96920c07b7 |
comparison
equal
deleted
inserted
replaced
916:1a759096ccbd | 917:a9401694d2dc |
---|---|
606 | 606 |
607 #MISC CALLBACKS# | 607 #MISC CALLBACKS# |
608 | 608 |
609 def setStatusOnline(self, online=True, show="", statuses={}): | 609 def setStatusOnline(self, online=True, show="", statuses={}): |
610 if not online or not statuses: | 610 if not online or not statuses: |
611 self.status_bar.setPresenceStatus(show if online else 'unavailable', '') | |
611 return | 612 return |
612 try: | 613 try: |
613 self.status_bar.setPresenceStatus(show, statuses['default']) | 614 self.status_bar.setPresenceStatus(show, statuses['default']) |
614 except (KeyError, TypeError): | 615 except (KeyError, TypeError): |
615 pass | 616 pass |