From 700b11e42d8045e8f4ef53588aab8e44dd9ac010 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 21 Sep 2011 00:52:03 +0200 Subject: =?UTF-8?q?Handles=20256=20colors,=20easier=20theming=20and=20more?= =?UTF-8?q?=20flexible=20way=20to=20define=20colors=20Doesn=E2=80=99t=20ru?= =?UTF-8?q?n=20yet=20if=20term=20doesn=E2=80=99t=20support=20256=20colors,?= =?UTF-8?q?=20I=20know=20(thus=20the=20branch=20"256")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/user.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/user.py') 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 -- cgit v1.2.3