[Dicson and I] fix some unicode issues
This commit is contained in:
parent
2acaa2e075
commit
b6b3bcb552
|
@ -46,6 +46,7 @@ import caps_cache
|
|||
import socket
|
||||
import time
|
||||
|
||||
from gi.repository import GObject
|
||||
from encodings.punycode import punycode_encode
|
||||
from string import Template
|
||||
|
||||
|
@ -474,6 +475,17 @@ def ensure_utf8_string(string):
|
|||
pass
|
||||
return string
|
||||
|
||||
def wrapped_ensure_utf8_string(fn):
|
||||
def wrapped(n):
|
||||
return ensure_utf8_string(n)
|
||||
return wrapped
|
||||
|
||||
@wrapped_ensure_utf8_string
|
||||
def escape_text(text):
|
||||
return GObject.markup_escape_text(text)
|
||||
|
||||
GObject.markup_escape_text = escape_text
|
||||
|
||||
def get_windows_reg_env(varname, default=''):
|
||||
"""
|
||||
Ask for paths commonly used but not exposed as ENVs in english Windows 2003
|
||||
|
|
|
@ -487,11 +487,11 @@ class RosterTooltip(NotificationAreaTooltip):
|
|||
vcard_current_row = 1
|
||||
properties = []
|
||||
|
||||
name_markup = u'<span weight="bold">' + \
|
||||
name_markup = '<span weight="bold">' + \
|
||||
GObject.markup_escape_text(prim_contact.get_shown_name())\
|
||||
+ '</span>'
|
||||
if gajim.config.get('mergeaccounts'):
|
||||
name_markup += u" <span foreground='%s'>(%s)</span>" % (
|
||||
name_markup += " <span foreground='%s'>(%s)</span>" % (
|
||||
gajim.config.get('tooltip_account_name_color'),
|
||||
GObject.markup_escape_text(prim_contact.account.name))
|
||||
|
||||
|
|
Loading…
Reference in New Issue