summaryrefslogtreecommitdiff
path: root/src/user.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-20 20:55:42 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-20 20:55:42 +0000
commit3ed25bdfce85e774b6992d32a112b69154d55f3e (patch)
tree6abf8715af116637bbb93cbb73b50967c1afdeba /src/user.py
parentdd1d7585f641b7319f59e9356286fd75df03fa70 (diff)
downloadpoezio-3ed25bdfce85e774b6992d32a112b69154d55f3e.tar.gz
poezio-3ed25bdfce85e774b6992d32a112b69154d55f3e.tar.bz2
poezio-3ed25bdfce85e774b6992d32a112b69154d55f3e.tar.xz
poezio-3ed25bdfce85e774b6992d32a112b69154d55f3e.zip
Themes are working, need a little polishing and documentation
Diffstat (limited to 'src/user.py')
-rw-r--r--src/user.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/user.py b/src/user.py
index 5dbe77ce..2959a76c 100644
--- a/src/user.py
+++ b/src/user.py
@@ -16,10 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with Poezio. If not, see <http://www.gnu.org/licenses/>.
-from random import randrange
+from random import randrange, choice
from config import config
from datetime import timedelta, datetime
import curses
+import theme
class User(object):
"""
@@ -29,7 +30,7 @@ class User(object):
self.last_talked = None
self.update(affiliation, show, status, role)
self.change_nick(nick)
- self.color = randrange(3, 10) # assign a random color
+ self.color = choice(theme.LIST_COLOR_NICKNAMES)
def update(self, affiliation, show, status, role):
self.affiliation = affiliation
@@ -60,5 +61,3 @@ class User(object):
def __repr__(self):
return ">%s<" % (self.nick.decode('utf-8'))
- # return "<user.User object nick:%s show:%s(%s) status:%s affiliation:%s>"\
- # % (self.nick.decode('utf-8'), self.show, type(self.show), self.status, self.affiliation)