diff src/browser/libervia_main.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
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Fri Feb 27 02:39:43 2015 +0100
+++ b/src/browser/libervia_main.py	Fri Feb 27 02:41:11 2015 +0100
@@ -385,8 +385,11 @@
         QuickApp.disconnectedHandler(self, profile)
         Window.getLocation().reload()
 
-    def setStatusOnline(self, online=True, show="", statuses={}, profile=C.PROF_KEY_NONE):
-        log.warning("setStatusOnline is not implemented, as session are for unique profile which is always online for now")
+    def setStatusOnline(self, online=True, show='', statuses={}, profile=C.PROF_KEY_NONE):
+        self.presence_status_panel.setPresence(show)
+        if statuses:
+            # FIXME: retrieve user language status or fallback to 'default'
+            self.presence_status_panel.setStatus(statuses.values()[0])
 
     def _tryAutoConnect(self, skip_validation=False):
         """This method retrieve the eventual URL parameters to auto-connect the user.