long subject in group chat makes window

bigger than the screen
This commit is contained in:
Dimitur Kirov 2005-08-01 15:03:26 +00:00
parent a6dda66f9d
commit d02118264a
1 changed files with 3 additions and 0 deletions

View File

@ -373,7 +373,10 @@ class GroupchatWindow(chat.Chat):
def set_subject(self, room_jid, subject):
self.subjects[room_jid] = subject
name_label = self.name_labels[room_jid]
if len(subject) > 100:
subject = subject[:97] + "..."
subject = gtkgui_helpers.escape_for_pango_markup(subject)
# long subject makes window bigger than the screen
name_label.set_markup('<span weight="heavy" size="x-large">%s</span>\n%s' % (room_jid, subject))
event_box = name_label.get_parent()
if subject == '':