comparison browser_side/panels.py @ 302:6e36b44cbd34

browser_side: bug fix for setting a new presence when the current one is 'unavailable'
author souliane <souliane@mailoo.org>
date Wed, 18 Dec 2013 08:59:44 +0100
parents a6b3715f0bd6
children 52b1afd7ac3f
comparison
equal deleted inserted replaced
301:5943eaa6f422 302:6e36b44cbd34
820 def getPresence(self): 820 def getPresence(self):
821 return self.presence 821 return self.presence
822 822
823 def setPresence(self, presence): 823 def setPresence(self, presence):
824 status = self.status_panel.status 824 status = self.status_panel.status
825 if not status.strip() or status == "&nbsp;" or status == const.PRESENCE[self.presence]: 825 if not status.strip() or status == "&nbsp;" or (self.presence in const.PRESENCE and status == const.PRESENCE[self.presence]):
826 self.changeStatus(const.PRESENCE[presence]) 826 self.changeStatus(const.PRESENCE[presence])
827 self.presence = presence 827 self.presence = presence
828 setPresenceStyle(self.presence_button, self.presence) 828 setPresenceStyle(self.presence_button, self.presence)
829 829
830 def changeStatus(self, new_status): 830 def changeStatus(self, new_status):