Strip status message

This commit is contained in:
Dimitur Kirov 2005-07-21 13:11:35 +00:00
parent 6c88e531f3
commit b63040681e
1 changed files with 8 additions and 4 deletions

View File

@ -584,7 +584,9 @@ class RosterTooltip(gtk.Window):
self.table.attach(image,2,3,self.current_row,
self.current_row + 1, 0, 0, 3, 0)
str_status = resource + ' ('+str(priority)+')'
if status or status.strip() != '':
if status:
status = status.strip()
if status != '':
str_status += ' - ' + status
status_label = gtk.Label(str_status)
status_label.set_alignment(00, 0)
@ -672,8 +674,10 @@ class RosterTooltip(gtk.Window):
if contact.show:
info += '\n<span weight="bold">' + _('Status: ') + \
'</span>' + helpers.get_uf_show(contact.show)
if contact.status and contact.status.strip() != '':
info += ' - ' + contact.status
if contact.status:
status = contact.status.strip()
if status != '':
info += ' - ' + status
self.account.set_markup(info)