gc-roster-tooltip : Status message in italic, in a new line after status itself
This commit is contained in:
parent
00f00f3dcd
commit
f4a15a1d16
|
@ -364,7 +364,7 @@ class GCTooltip(BaseTooltip):
|
||||||
vcard_table.set_homogeneous(False)
|
vcard_table.set_homogeneous(False)
|
||||||
vcard_current_row = 1
|
vcard_current_row = 1
|
||||||
properties = []
|
properties = []
|
||||||
|
status_message_present = False
|
||||||
|
|
||||||
nick_markup = '<span weight="bold">' + \
|
nick_markup = '<span weight="bold">' + \
|
||||||
gtkgui_helpers.escape_for_pango_markup(contact.get_shown_name()) \
|
gtkgui_helpers.escape_for_pango_markup(contact.get_shown_name()) \
|
||||||
|
@ -373,14 +373,19 @@ class GCTooltip(BaseTooltip):
|
||||||
|
|
||||||
# status :
|
# status :
|
||||||
show = helpers.get_uf_show(contact.show)
|
show = helpers.get_uf_show(contact.show)
|
||||||
if contact.status:
|
|
||||||
status = contact.status.strip()
|
|
||||||
if status != '':
|
|
||||||
# escape markup entities
|
|
||||||
status = gtkgui_helpers.reduce_chars_newlines(status, 200, 5)
|
|
||||||
show += ' - ' + gtkgui_helpers.escape_for_pango_markup(status)
|
|
||||||
properties.append((show, None))
|
properties.append((show, None))
|
||||||
|
|
||||||
|
#status message :
|
||||||
|
if contact.status:
|
||||||
|
status_message = contact.status.strip()
|
||||||
|
if status_message != '':
|
||||||
|
# escape markup entities
|
||||||
|
status_message = gtkgui_helpers.reduce_chars_newlines(status_message, 200, 5)
|
||||||
|
status_message = '<span style="italic">' +\
|
||||||
|
gtkgui_helpers.escape_for_pango_markup(status_message) + '</span>'
|
||||||
|
properties.append((status_message, None))
|
||||||
|
status_message_present = True
|
||||||
|
|
||||||
if contact.jid.strip() != '':
|
if contact.jid.strip() != '':
|
||||||
properties.append((_('JID: '), contact.jid))
|
properties.append((_('JID: '), contact.jid))
|
||||||
if contact.affiliation != "none":
|
if contact.affiliation != "none":
|
||||||
|
@ -406,7 +411,8 @@ class GCTooltip(BaseTooltip):
|
||||||
while properties:
|
while properties:
|
||||||
property = properties.pop(0)
|
property = properties.pop(0)
|
||||||
vcard_current_row += 1
|
vcard_current_row += 1
|
||||||
if vcard_current_row == 4:
|
if vcard_current_row == 4 and not status_message_present or\
|
||||||
|
vcard_current_row == 5 and status_message_present:
|
||||||
# horizontal separator after status, if something after
|
# horizontal separator after status, if something after
|
||||||
h_separator = gtk.HSeparator()
|
h_separator = gtk.HSeparator()
|
||||||
vcard_table.attach(h_separator, 1, 3, vcard_current_row, vcard_current_row + 1,\
|
vcard_table.attach(h_separator, 1, 3, vcard_current_row, vcard_current_row + 1,\
|
||||||
|
|
Loading…
Reference in New Issue