Integrate new colors table

This commit is contained in:
Marco Pesenti Gritti
2006-09-08 13:53:55 +02:00
parent 7abb2f7387
commit 8d27527fd9
5 changed files with 579 additions and 115 deletions
+5 -6
View File
@@ -1,14 +1,14 @@
import os
from ConfigParser import ConfigParser
from sugar.canvas.IconColor import IconColor
from sugar.canvas import IconColor
from sugar import env
class _Profile:
def __init__(self,):
self._path = env.get_profile_path()
self._nick_name = None
self._color = None
self._color = IconColor.IconColor()
self._ensure_dirs()
@@ -18,10 +18,9 @@ class _Profile:
if cp.has_option('Buddy', 'NickName'):
self._nick_name = cp.get('Buddy', 'NickName')
if cp.has_option('Buddy', 'Color'):
self._color = IconColor(cp.get('Buddy', 'Color'))
if self._color == None:
self.set_color(IconColor())
fill_color = cp.get('Buddy', 'Color')
if IconColor.is_valid(fill_color):
self._color = IconColor.IconColor(fill_color)
def _ensure_dirs(self):
try: