only one line for status msg under contact

This commit is contained in:
Nikos Kouremenos 2005-11-08 15:24:19 +00:00
parent 7e2b61802f
commit 3492272881
3 changed files with 4 additions and 3 deletions

View File

@ -366,6 +366,7 @@ class GroupchatWindow(chat.Chat):
if status and gajim.config.get('show_status_msgs_in_roster'):
status = status.strip()
if status != '':
status = gtkgui_helpers.reduce_chars_newlines(status, max_lines = 1)
colorstring = 'dimgrey'
# escape markup entities and make them small italic and fg color
#color = gtkgui_helpers._get_fade_color(self.list_treeview[room_jid],

View File

@ -118,10 +118,9 @@ def reduce_chars_newlines(text, max_chars = 0, max_lines = 0,
'''Cut the chars after 'max_chars' on each line
and show only the first 'max_lines'. If there is more text
to be shown, display the whole text in tooltip on 'widget'
If any of the params is not present(None or 0) the action
If any of the params is not present (None or 0) the action
on it is not performed'''
text = text
def _cut_if_long(str):
if len(str) > max_chars:
str = str[:max_chars - 3] + '...'

View File

@ -254,6 +254,7 @@ class RosterWindow:
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
status = contact.status.strip()
if status != '':
status = gtkgui_helpers.reduce_chars_newlines(status, max_lines = 1)
# escape markup entities and make them small italic and fg color
color = gtkgui_helpers._get_fade_color(self.tree, selected, focus)
colorstring = "#%04x%04x%04x" % (color.red, color.green, color.blue)