From 9693723ebf004aea7947b1c68c7c8e0b949510cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Thu, 10 Jul 2008 00:17:46 +0200 Subject: Moved color info to config --- portato/gui/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'portato/gui/utils.py') diff --git a/portato/gui/utils.py b/portato/gui/utils.py index 923f2fa..cd5c50c 100644 --- a/portato/gui/utils.py +++ b/portato/gui/utils.py @@ -21,6 +21,8 @@ from collections import defaultdict from threading import Thread, RLock from functools import wraps +import gtk + # some backend things from ..backend import flags, system, set_system from ..helper import debug, info, set_log_level @@ -29,6 +31,9 @@ from ..constants import APP, LOCALE_DIR # parser from ..config_parser import ConfigParser +def get_color (cfg, name): + return gtk.gdk.color_parse("#%s" % cfg.get(name, section = "COLORS")) + class GtkThread (Thread): def run(self): # for some reason, I have to install this for each thread ... -- cgit v1.2.3