From 2a4e59654f62ba63fba2cf9d32036a6404dfa60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 19 Aug 2018 23:48:07 +0200 Subject: [PATCH] HistoryManager: Convert RGB to hex --- gajim/history_manager.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/gajim/history_manager.py b/gajim/history_manager.py index 625b55f30..db6f69b39 100644 --- a/gajim/history_manager.py +++ b/gajim/history_manager.py @@ -89,6 +89,7 @@ from gajim.gtk import YesNoDialog from gajim.gtk import ErrorDialog from gajim.gtk import ConfirmationDialog from gajim.gtk.filechoosers import FileSaveDialog +from gajim.gtk.util import convert_rgb_to_hex from gajim import gtkgui_helpers @@ -393,16 +394,18 @@ class HistoryManager: else: color = None if kind in (KindConstant.SINGLE_MSG_RECV, - KindConstant.CHAT_MSG_RECV, KindConstant.GC_MSG): - # it is the other side - color = app.css_config.get_value('.gajim-incoming-nickname', StyleAttr.COLOR) # so incoming color + KindConstant.CHAT_MSG_RECV, + KindConstant.GC_MSG): + color = app.css_config.get_value( + '.gajim-incoming-nickname', StyleAttr.COLOR) elif kind in (KindConstant.SINGLE_MSG_SENT, - KindConstant.CHAT_MSG_SENT): # it is us - color = app.css_config.get_value('.gajim-outgoing-nickname', StyleAttr.COLOR) # so outgoing color + KindConstant.CHAT_MSG_SENT): + color = app.css_config.get_value( + '.gajim-outgoing-nickname', StyleAttr.COLOR) elif kind in (KindConstant.STATUS, - KindConstant.GCSTATUS): # is is statuses - # so status color - color = app.css_config.get_value('.gajim-status-message', StyleAttr.COLOR) + KindConstant.GCSTATUS): + color = app.css_config.get_value( + '.gajim-status-message', StyleAttr.COLOR) # include status into (status) message if message is None: message = '' @@ -413,10 +416,11 @@ class HistoryManager: message_ = '