From e84e0d2a7d20cb158f4789b661bf3ed3f6b85e7f Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Mon, 20 Aug 2012 03:21:25 +0000 Subject: GTK3 port start The activity can open, but there're a lot of bugs: * load from file doesn't work * add value only works at the first time * remove value never works * the helpbutton is too wide (wrap doesn't work) * Signed-off-by: Agustin Zubiaga --- (limited to 'utils.py') diff --git a/utils.py b/utils.py index 80716d8..7a5670e 100644 --- a/utils.py +++ b/utils.py @@ -19,9 +19,9 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import os -import gtk -from sugar import profile +from sugar3 import profile +from sugar3.graphics.style import Color def rgb2html(color): @@ -50,7 +50,7 @@ def get_user_fill_color(type='gdk'): color = profile.get_color() if type == 'gdk': - rcolor = gtk.gdk.Color(color.get_fill_color()) + rcolor = Color(color.get_fill_color()).get_gdk_color() elif type == 'str': rcolor = color.get_fill_color() @@ -63,7 +63,7 @@ def get_user_stroke_color(type='gdk'): color = profile.get_color() if type == 'gdk': - rcolor = gtk.gdk.Color(color.get_stroke_color()) + rcolor = Color(color.get_stroke_color()).get_gdk_color() elif type == 'str': rcolor = color.get_stroke_color() -- cgit v0.9.1