[evolution] gnome-canvas: Use gdk_parse_color() in GnomeCanvasShape
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] gnome-canvas: Use gdk_parse_color() in GnomeCanvasShape
- Date: Fri, 29 Oct 2010 18:40:49 +0000 (UTC)
commit b6cc0f11b8607ef713300f384e279d7ffa4f2abb
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 21 01:54:35 2010 +0200
gnome-canvas: Use gdk_parse_color() in GnomeCanvasShape
We don't want to allocate colors anymore. It's not needed with cairo.
libgnomecanvas/gnome-canvas-shape.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgnomecanvas/gnome-canvas-shape.c b/libgnomecanvas/gnome-canvas-shape.c
index 334eff8..a2ff712 100644
--- a/libgnomecanvas/gnome-canvas-shape.c
+++ b/libgnomecanvas/gnome-canvas-shape.c
@@ -249,7 +249,8 @@ gnome_canvas_shape_set_property (GObject *object,
switch (param_id) {
case PROP_FILL_COLOR:
- if (gnome_canvas_get_color (item->canvas, g_value_get_string (value), &color)) {
+ if (g_value_get_string (value) &&
+ gdk_color_parse (g_value_get_string (value), &color)) {
priv->fill_set = TRUE;
priv->fill_rgba = get_rgba_from_color (&color);
} else if (priv->fill_set)
@@ -281,7 +282,8 @@ gnome_canvas_shape_set_property (GObject *object,
break;
case PROP_OUTLINE_COLOR:
- if (gnome_canvas_get_color (item->canvas, g_value_get_string (value), &color)) {
+ if (g_value_get_string (value) &&
+ gdk_color_parse (g_value_get_string (value), &color)) {
priv->outline_set = TRUE;
priv->outline_rgba = get_rgba_from_color (&color);
} else if (priv->outline_set)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]