[gtk+] border-image: unpack the GtkGradient if there's one
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] border-image: unpack the GtkGradient if there's one
- Date: Fri, 10 Jun 2011 03:09:03 +0000 (UTC)
commit 9e5d6544ba3703a63a7dfc40ca9bd1590dda5c42
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jun 9 22:41:36 2011 -0400
border-image: unpack the GtkGradient if there's one
So that it will eventually be resolved by the style property lookup
machinery.
gtk/gtkborderimage.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkborderimage.c b/gtk/gtkborderimage.c
index f5cca50..3f41cdf 100644
--- a/gtk/gtkborderimage.c
+++ b/gtk/gtkborderimage.c
@@ -150,7 +150,12 @@ _gtk_border_image_unpack (const GValue *value,
GtkBorderImage *image = g_value_get_boxed (value);
parameter[0].name = "border-image-source";
- g_value_init (¶meter[0].value, CAIRO_GOBJECT_TYPE_PATTERN);
+
+ if ((image != NULL) &&
+ (image->source_gradient != NULL))
+ g_value_init (¶meter[0].value, GTK_TYPE_GRADIENT);
+ else
+ g_value_init (¶meter[0].value, CAIRO_GOBJECT_TYPE_PATTERN);
parameter[1].name = "border-image-slice";
g_value_init (¶meter[1].value, GTK_TYPE_BORDER);
@@ -163,7 +168,11 @@ _gtk_border_image_unpack (const GValue *value,
if (image != NULL)
{
- g_value_set_boxed (¶meter[0].value, image->source);
+ if (image->source_gradient != NULL)
+ g_value_set_boxed (¶meter[0].value, image->source_gradient);
+ else
+ g_value_set_boxed (¶meter[0].value, image->source);
+
g_value_set_boxed (¶meter[1].value, &image->slice);
g_value_set_boxed (¶meter[2].value, &image->repeat);
g_value_set_boxed (¶meter[3].value, image->width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]