Mercurial > libervia-web
comparison src/browser/sat_browser/main_panel.py @ 655:048401e5c506 frontends_multi_profiles
browser_side: implements setStatusOnline since it is not used only for setting the connected state on/off, but also to update the user presence and status
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 27 Feb 2015 02:41:11 +0100 |
parents | 40c72f3b7638 |
children | 0b7e4226378d |
comparison
equal
deleted
inserted
replaced
654:40c72f3b7638 | 655:048401e5c506 |
---|---|
172 for presence, presence_i18n in C.PRESENCE.items(): | 172 for presence, presence_i18n in C.PRESENCE.items(): |
173 html = u'<span class="%s">◉</span> %s' % (contact_list.buildPresenceStyle(presence), presence_i18n) | 173 html = u'<span class="%s">◉</span> %s' % (contact_list.buildPresenceStyle(presence), presence_i18n) |
174 self.addMenuItem([u"◉", presence], [u"◉", html], '', base_menu.MenuCmd(self, 'changePresenceCb', presence), asHTML=True) | 174 self.addMenuItem([u"◉", presence], [u"◉", html], '', base_menu.MenuCmd(self, 'changePresenceCb', presence), asHTML=True) |
175 self.parent_panel = parent | 175 self.parent_panel = parent |
176 | 176 |
177 def changePresenceCb(self, presence): | 177 def changePresenceCb(self, presence=''): |
178 """Callback to notice the backend of a new presence set by the user. | 178 """Callback to notice the backend of a new presence set by the user. |
179 @param presence (str): the new presence is a value in ('', 'chat', 'away', 'dnd', 'xa') | 179 @param presence (str): the new presence is a value in ('', 'chat', 'away', 'dnd', 'xa') |
180 """ | 180 """ |
181 self.host.bridge.call('setStatus', None, presence, self.parent_panel.status_panel.status) | 181 self.host.bridge.call('setStatus', None, presence, self.parent_panel.status_panel.status) |
182 | 182 |