Mercurial > libervia-web
diff src/browser/libervia_main.py @ 662:ebb602d8b3f2 frontends_multi_profiles
browser_side: replace all instances of 'str' with 'unicode'
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 03 Mar 2015 06:51:13 +0100 |
parents | 8e7d4de56e75 |
children | 423182fea41c |
line wrap: on
line diff
--- a/src/browser/libervia_main.py Tue Mar 03 06:24:27 2015 +0100 +++ b/src/browser/libervia_main.py Tue Mar 03 06:51:13 2015 +0100 @@ -212,7 +212,7 @@ """Return avatar of a jid if in cache, else ask for it. @param jid_ (jid.JID): JID of the contact - @return: the URL to the avatar (str) + @return: the URL to the avatar (unicode) """ assert isinstance(jid_, jid.JID) contact_list = self.contact_list # pyjamas issue: need a temporary variable to call a property's method @@ -434,7 +434,7 @@ def _actionEb(self, err_data): err_code, err_obj = err_data dialog.InfoDialog("Error", - str(err_obj), Width="400px").center() + unicode(err_obj), Width="400px").center() def launchAction(self, callback_id, data): """ Launch a dynamic action @@ -648,7 +648,7 @@ # @param class_ (class): class of the panel (ChatPanel, MicroblogPanel...) # @param entity (dict): dictionnary to define the entity. # @param select (bool): if True, select the widget that has been found or created - # @param new_tab (str): if not None, a widget which is created is created in + # @param new_tab (unicode): if not None, a widget which is created is created in # a new tab. In that case new_tab is a unicode to label that new tab. # If new_tab is not None and a widget is found, no tab is created. # @return: the newly created wigdet if REUSE_EXISTING_LIBERVIA_WIDGETS @@ -885,7 +885,7 @@ # def _chatStateReceivedCb(self, from_jid_s, state): # """Callback when a new chat state is received. # @param from_jid_s: JID of the contact who sent his state, or '@ALL@' - # @param state: new state (string) + # @param state (unicode): new state # """ # if from_jid_s == '@ALL@': # for lib_wid in self.libervia_widgets: @@ -923,15 +923,15 @@ def getCachedParam(self, category, name): """Return a parameter cached value (e.g for refreshing the UI) - @param category (str): the parameter category - @pram name (str): the parameter name + @param category (unicode): the parameter category + @pram name (unicode): the parameter name """ return self.cached_params[(category, name)] if (category, name) in self.cached_params else None def sendError(self, errorData): dialog.InfoDialog("Error while sending message", "Your message can't be sent", Width="400px").center() - log.error("sendError: %s" % str(errorData)) + log.error("sendError: %s" % unicode(errorData)) # FIXME: this method is fat too complicated and depend of widget type # must be refactored and moved to each widget instead