Skip to content
Snippets Groups Projects
Commit 83e3a2b4 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

wrap lines in roster tooltip. so we can increase width of status to 300 chars width. fixes #2966

parent 010f53a4
No related branches found
No related tags found
No related merge requests found
......@@ -482,8 +482,9 @@ class RosterTooltip(NotificationAreaTooltip):
status = contact.status.strip()
if status:
# reduce long status
# (no more than 100 chars on line and no more than 5 lines)
status = helpers.reduce_chars_newlines(status, 100, 5)
# (no more than 300 chars on line and no more than 5 lines)
# status is wrapped
status = helpers.reduce_chars_newlines(status, 300, 5)
# escape markup entities.
status = gobject.markup_escape_text(status)
properties.append(('<i>%s</i>' % status, None))
......@@ -534,6 +535,7 @@ class RosterTooltip(NotificationAreaTooltip):
else:
if isinstance(property[0], (unicode, str)): #FIXME: rm unicode?
label.set_markup(property[0])
label.set_line_wrap(True)
else:
label = property[0]
vcard_table.attach(label, 1, 3, vcard_current_row,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment