From 2f3fe1b158d116e736ac3f3aa38dd6fd175d98b8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 13 Mar 2006 09:04:50 +0000 Subject: [PATCH] don't show an empty line in groupchat banner if there is no subject. Fixes #1688 --- src/groupchat_control.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 19755d35a..962c7a9c3 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -541,8 +541,11 @@ class GroupchatControl(ChatControlBase): self.name_label.set_ellipsize(pango.ELLIPSIZE_END) subject = gtkgui_helpers.reduce_chars_newlines(subject, 0, 2) subject = gtkgui_helpers.escape_for_pango_markup(subject) - self.name_label.set_markup( - '%s\n%s' % (self.room_jid, subject)) + text = '%s' % \ + self.room_jid + if subject: + text += '\n%s' % subject + self.name_label.set_markup(text) event_box = self.name_label.get_parent() if subject == '': self.subject = _('This room has no subject')