diff --git a/src/common/config.py b/src/common/config.py index 903c313e817342a9b16b03f7c307073f5a047ff2..781b18b568a0c54e7044f3d2917d542f625bb1f5 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -90,11 +90,18 @@ class Config: 'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ], 'activity_iconset': [ opt_str, DEFAULT_ACTIVITY_ICONSET, '', True ], 'use_transports_iconsets': [ opt_bool, True, '', True ], - 'inmsgcolor': [ opt_color, '#a40000', '', True ], - 'outmsgcolor': [ opt_color, '#3465a4', '', True ], - 'statusmsgcolor': [ opt_color, '#73d216', '', True ], + 'inmsgcolor': [ opt_color, '#a40000', _('Incoming nickname color.'), True ], + 'outmsgcolor': [ opt_color, '#3465a4', _('Outgoing nickname color.'), True ], + 'inmsgtxtcolor': [ opt_color, '', _('Incoming text color.'), True ], + 'outmsgtxtcolor': [ opt_color, '#a2a2a2', _('Outgoing text color.'), True ], + 'statusmsgcolor': [ opt_color, '#73d216', _('Status message text color.'), True ], 'markedmsgcolor': [ opt_color, '#ff8080', '', True ], 'urlmsgcolor': [ opt_color, '#204a87', '', True ], + 'inmsgfont': [ opt_str, '', _('Incoming nickname font.'), True ], + 'outmsgfont': [ opt_str, '', _('Outgoing nickname font.'), True ], + 'inmsgtxtfont': [ opt_str, '', _('Incoming text font.'), True ], + 'outmsgtxtfont': [ opt_str, '', _('Outgoing text font.'), True ], + 'statusmsgfont': [ opt_str, '', _('Status message text font.'), True ], 'collapsed_rows': [ opt_str, '', _('List (space separated) of rows (accounts and groups) that are collapsed.'), True ], 'roster_theme': [ opt_str, _('default'), '', True ], 'mergeaccounts': [ opt_bool, False, '', True ], diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 6e44f1ddcf3657d775b703e9d42023afd36351f1..3af295cbb56057998f4722680acc5b4f4af7e55f 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -230,13 +230,35 @@ class ConversationTextview(gobject.GObject): self.tagIn = buffer_.create_tag('incoming') color = gajim.config.get('inmsgcolor') + font = pango.FontDescription(gajim.config.get('inmsgfont')) self.tagIn.set_property('foreground', color) + self.tagIn.set_property('font-desc', font) + self.tagOut = buffer_.create_tag('outgoing') color = gajim.config.get('outmsgcolor') + font = pango.FontDescription(gajim.config.get('outmsgfont')) self.tagOut.set_property('foreground', color) + self.tagOut.set_property('font-desc', font) + self.tagStatus = buffer_.create_tag('status') color = gajim.config.get('statusmsgcolor') + font = pango.FontDescription(gajim.config.get('satusmsgfont')) self.tagStatus.set_property('foreground', color) + self.tagStatus.set_property('font-desc', font) + + self.tagInText = buffer_.create_tag('incomingtxt') + color = gajim.config.get('inmsgtxtcolor') + font = pango.FontDescription(gajim.config.get('inmsgtxtfont')) + if color: + self.tagInText.set_property('foreground', color) + self.tagInText.set_property('font-desc', font) + + self.tagOutText = buffer_.create_tag('outgoingtxt') + color = gajim.config.get('outmsgtxtcolor') + if color: + font = pango.FontDescription(gajim.config.get('outmsgtxtfont')) + self.tagOutText.set_property('foreground', color) + self.tagOutText.set_property('font-desc', font) colors = gajim.config.get('gc_nicknames_colors') colors = colors.split(':') @@ -1219,6 +1241,10 @@ class ConversationTextview(gobject.GObject): 'chat_merge_consecutive_nickname_indent')) else: self.print_name(name, kind, other_tags_for_name) + if kind == 'incoming': + text_tags.append('incomingtxt') + elif kind == 'outgoing': + text_tags.append('outgoingtxt') self.print_subject(subject) self.print_real_text(text, text_tags, name, xhtml, graphics=graphics)