Skip to content

Commit

Permalink
Add msg_text_self to colour scheme
Browse files Browse the repository at this point in the history
Fixes tdryer#276.

[[email protected]: cleaned up and changed colour name for
consistency]
  • Loading branch information
gadmin authored and tdryer committed Dec 2, 2016
1 parent d5147ad commit 65c1048
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hangups/ui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
('msg_sender', '', ''),
('msg_self', '', ''),
('msg_text', '', ''),
('msg_text_self', '', ''),
('status_line', 'standout', ''),
('tab_background', 'standout', ''),
},
Expand All @@ -43,14 +44,17 @@
('inactive_tab', 'underline', 'light green'),
('msg_date', 'dark cyan', ''),
('msg_sender', 'dark blue', ''),
('msg_text_self', '', ''),
('msg_self', 'light blue', ''),
('msg_text', '', ''),
('status_line', 'standout', ''),
('tab_background', 'black,standout,underline', 'light green'),
},
}
COL_SCHEME_NAMES = ('active_tab', 'inactive_tab', 'msg_date', 'msg_sender',
'msg_self', 'msg_text', 'status_line', 'tab_background')
COL_SCHEME_NAMES = (
'active_tab', 'inactive_tab', 'msg_date', 'msg_sender', 'msg_self',
'msg_text', 'msg_text_self', 'status_line', 'tab_background'
)


class ChatUI(object):
Expand Down Expand Up @@ -463,7 +467,7 @@ def __init__(self, timestamp, text, datetimefmt, user=None,
text = [
('msg_date', self._get_date_str(timestamp, datetimefmt,
show_date=show_date) + ' '),
('msg_text', text)
('msg_text_self' if user.is_self else 'msg_text', text)
]
if user is not None:
text.insert(1, ('msg_self' if user.is_self else 'msg_sender',
Expand Down

0 comments on commit 65c1048

Please sign in to comment.