only one line for status msg under contact
This commit is contained in:
parent
7e2b61802f
commit
3492272881
|
@ -366,6 +366,7 @@ class GroupchatWindow(chat.Chat):
|
||||||
if status and gajim.config.get('show_status_msgs_in_roster'):
|
if status and gajim.config.get('show_status_msgs_in_roster'):
|
||||||
status = status.strip()
|
status = status.strip()
|
||||||
if status != '':
|
if status != '':
|
||||||
|
status = gtkgui_helpers.reduce_chars_newlines(status, max_lines = 1)
|
||||||
colorstring = 'dimgrey'
|
colorstring = 'dimgrey'
|
||||||
# escape markup entities and make them small italic and fg color
|
# escape markup entities and make them small italic and fg color
|
||||||
#color = gtkgui_helpers._get_fade_color(self.list_treeview[room_jid],
|
#color = gtkgui_helpers._get_fade_color(self.list_treeview[room_jid],
|
||||||
|
|
|
@ -118,9 +118,8 @@ def reduce_chars_newlines(text, max_chars = 0, max_lines = 0,
|
||||||
'''Cut the chars after 'max_chars' on each line
|
'''Cut the chars after 'max_chars' on each line
|
||||||
and show only the first 'max_lines'. If there is more text
|
and show only the first 'max_lines'. If there is more text
|
||||||
to be shown, display the whole text in tooltip on 'widget'
|
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'''
|
on it is not performed'''
|
||||||
text = text
|
|
||||||
|
|
||||||
def _cut_if_long(str):
|
def _cut_if_long(str):
|
||||||
if len(str) > max_chars:
|
if len(str) > max_chars:
|
||||||
|
|
|
@ -254,6 +254,7 @@ class RosterWindow:
|
||||||
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
|
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
|
||||||
status = contact.status.strip()
|
status = contact.status.strip()
|
||||||
if status != '':
|
if status != '':
|
||||||
|
status = gtkgui_helpers.reduce_chars_newlines(status, max_lines = 1)
|
||||||
# escape markup entities and make them small italic and fg color
|
# escape markup entities and make them small italic and fg color
|
||||||
color = gtkgui_helpers._get_fade_color(self.tree, selected, focus)
|
color = gtkgui_helpers._get_fade_color(self.tree, selected, focus)
|
||||||
colorstring = "#%04x%04x%04x" % (color.red, color.green, color.blue)
|
colorstring = "#%04x%04x%04x" % (color.red, color.green, color.blue)
|
||||||
|
|
Loading…
Reference in New Issue