Strip status message

This commit is contained in:
Dimitur Kirov 2005-07-21 13:11:35 +00:00
parent 6c88e531f3
commit b63040681e

View file

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