diff options
author | mathieui <mathieui@mathieui.net> | 2013-07-31 23:43:19 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-07-31 23:43:19 +0200 |
commit | 19135d4a76790c0675529eaa7591b326e631d8e6 (patch) | |
tree | ac3af0a5871886a15b655a3b5a089e60b20eb609 /src/theming.py | |
parent | b249dad73d2e7c6dde05855ccfbc4d2541cf10d8 (diff) | |
download | poezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.gz poezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.bz2 poezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.xz poezio-19135d4a76790c0675529eaa7591b326e631d8e6.zip |
Fix #2306 (none, to, and from subscriptions should be more visible)
Added a configuration option and some theme variables.
Diffstat (limited to 'src/theming.py')
-rw-r--r-- | src/theming.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/theming.py b/src/theming.py index c999ef2c..975da92a 100644 --- a/src/theming.py +++ b/src/theming.py @@ -112,6 +112,20 @@ class Theme(object): } return show_mapping.get(show, cls.COLOR_STATUS_NONE) + @classmethod + def char_subscription(cls, sub, keep='incomplete'): + sub_mapping = { + 'from': cls.CHAR_ROSTER_FROM, + 'both': cls.CHAR_ROSTER_BOTH, + 'none': cls.CHAR_ROSTER_NONE, + 'to': cls.CHAR_ROSTER_TO, + } + if keep == 'incomplete' and sub == 'both': + return '' + if keep in ('both', 'none', 'to', 'from'): + return sub_mapping[sub] if sub == keep else '' + return sub_mapping.get(sub, '') + # Message text color COLOR_NORMAL_TEXT = (-1, -1) COLOR_INFORMATION_TEXT = (5, -1) # TODO @@ -243,12 +257,18 @@ class Theme(object): CHAR_ROSTER_ACTIVITY = '☃' CHAR_ROSTER_MOOD = '☺' CHAR_ROSTER_GAMING = '♠' + CHAR_ROSTER_FROM = '←' + CHAR_ROSTER_BOTH = '↔' + CHAR_ROSTER_TO = '→' + CHAR_ROSTER_NONE = '⇹' COLOR_ROSTER_GAMING = (6, -1) COLOR_ROSTER_MOOD = (2, -1) COLOR_ROSTER_ACTIVITY = (3, -1) COLOR_ROSTER_TUNE = (6, -1) COLOR_ROSTER_ERROR = (1, -1) + COLOR_ROSTER_SUBSCRIPTION = (-1, -1) + COLOR_JOIN_CHAR = (4, -1) COLOR_QUIT_CHAR = (1, -1) COLOR_KICK_CHAR = (1, -1) |