From b63040681ed5d1d4b4019903fbd7a10a23e0498f Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Thu, 21 Jul 2005 13:11:35 +0000 Subject: [PATCH] Strip status message --- src/dialogs.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/dialogs.py b/src/dialogs.py index 876b372a7..9c853214f 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -584,8 +584,10 @@ 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() != '': - str_status += ' - ' + status + if status: + status = status.strip() + if status != '': + str_status += ' - ' + status status_label = gtk.Label(str_status) status_label.set_alignment(00, 0) 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: info += '\n' + _('Status: ') + \ '' + 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)