diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-09-21 00:52:03 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-09-21 00:52:03 +0200 |
commit | 700b11e42d8045e8f4ef53588aab8e44dd9ac010 (patch) | |
tree | e913e8d5cd50701d6c95f4db6a11bb477744dbb3 /src/user.py | |
parent | 46705e18611cf49e5c0b45ce51ced221b0162167 (diff) | |
download | poezio-700b11e42d8045e8f4ef53588aab8e44dd9ac010.tar.gz poezio-700b11e42d8045e8f4ef53588aab8e44dd9ac010.tar.bz2 poezio-700b11e42d8045e8f4ef53588aab8e44dd9ac010.tar.xz poezio-700b11e42d8045e8f4ef53588aab8e44dd9ac010.zip |
Handles 256 colors, easier theming and more flexible way to define colors
Doesn’t run yet if term doesn’t support 256 colors, I know
(thus the branch "256")
Diffstat (limited to 'src/user.py')
-rw-r--r-- | src/user.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/user.py b/src/user.py index 0fe0bad4..5867e1f3 100644 --- a/src/user.py +++ b/src/user.py @@ -10,11 +10,13 @@ Define the user class. An user is a MUC participant, not a roster contact (see contact.py) """ +import curses + from random import randrange, choice from config import config from datetime import timedelta, datetime -import curses -import theme + +from theming import get_theme ROLE_DICT = { '':0, @@ -32,7 +34,7 @@ class User(object): self.last_talked = datetime(1, 1, 1) # The oldest possible time self.update(affiliation, show, status, role) self.change_nick(nick) - self.color = choice(theme.LIST_COLOR_NICKNAMES) + self.color = choice(get_theme().LIST_COLOR_NICKNAMES) self.jid = jid self.chatstate = None |