diff src/browser/sat_browser/libervia_widget.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/sat_browser/libervia_widget.py	Tue Mar 03 06:24:27 2015 +0100
+++ b/src/browser/sat_browser/libervia_widget.py	Tue Mar 03 06:51:13 2015 +0100
@@ -50,6 +50,9 @@
 import base_panel
 
 
+unicode = str  # FIXME: pyjamas workaround
+
+
 # FIXME: we need to group several unrelated panels/widgets in this module because of isinstance tests and other references to classes (e.g. if we separate Drag n Drop classes in a separate module, we'll have cyclic import because of the references to LiberviaWidget in DropCell).
 # TODO: use a more generic method (either use duck typing, or register classes in a generic way, without hard references), then split classes in separate modules
 
@@ -358,8 +361,8 @@
         """Init the widget
 
         @param host (SatWebFrontend): SatWebFrontend instance
-        @param title (str): title shown in the header of the widget
-        @param info (str, callable): info shown in the header of the widget
+        @param title (unicode): title shown in the header of the widget
+        @param info (unicode, callable): info shown in the header of the widget
         @param selectable (bool): True is widget can be selected by user
         """
         VerticalPanel.__init__(self)
@@ -372,7 +375,7 @@
         self._title = Label(title)
         self._title.setStyleName('widgetHeader_title')
         if info is not None:
-            if isinstance(info, str):
+            if isinstance(info, unicode):
                 self._info = HTML(info)
             else:  # the info will be set by a callback
                 assert callable(info)