summaryrefslogtreecommitdiff
path: root/eel/eel-background.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-06-16 13:35:02 +0200
committerraveit65 <[email protected]>2016-07-02 10:50:56 +0200
commite983f64abd52242d96d9ed3825395f2e1f3dea5e (patch)
tree1db22130eda2f1d23818334a76a926e37b056f13 /eel/eel-background.c
parentd829c648eb20daa6ad487768195e1379a2ddb135 (diff)
downloadcaja-e983f64abd52242d96d9ed3825395f2e1f3dea5e.tar.bz2
caja-e983f64abd52242d96d9ed3825395f2e1f3dea5e.tar.xz
GTK+-3 eel: rename GdkRGBA functions
Diffstat (limited to 'eel/eel-background.c')
-rw-r--r--eel/eel-background.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index becd28f8..2e2b40cf 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -233,11 +233,19 @@ eel_bg_get_desktop_color (EelBackground *self)
use_gradient = FALSE;
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ start_color = eel_gdk_rgb_to_color_spec (eel_gdk_rgba_to_rgb (&primary));
+
+ if (use_gradient)
+ {
+ end_color = eel_gdk_rgb_to_color_spec (eel_gdk_rgba_to_rgb (&secondary));
+#else
start_color = eel_gdk_rgb_to_color_spec (eel_gdk_color_to_rgb (&primary));
if (use_gradient)
{
end_color = eel_gdk_rgb_to_color_spec (eel_gdk_color_to_rgb (&secondary));
+#endif
color_spec = eel_gradient_new (start_color, end_color, is_horizontal);
g_free (end_color);
}
@@ -270,7 +278,11 @@ set_image_properties (EelBackground *self)
}
else if (!eel_gradient_is_gradient (self->details->color))
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ eel_gdk_rgba_parse_with_white_default (&c, self->details->color);
+#else
eel_gdk_color_parse_with_white_default (self->details->color, &c);
+#endif
make_color_inactive (self, &c);
mate_bg_set_color (self->details->bg, MATE_BG_COLOR_SOLID, &c, NULL);
}
@@ -284,12 +296,21 @@ set_image_properties (EelBackground *self)
char *spec;
spec = eel_gradient_get_start_color_spec (self->details->color);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ eel_gdk_rgba_parse_with_white_default (&c1, spec);
+ make_color_inactive (self, &c1);
+ g_free (spec);
+
+ spec = eel_gradient_get_end_color_spec (self->details->color);
+ eel_gdk_rgba_parse_with_white_default (&c2, spec);
+#else
eel_gdk_color_parse_with_white_default (spec, &c1);
make_color_inactive (self, &c1);
g_free (spec);
spec = eel_gradient_get_end_color_spec (self->details->color);
eel_gdk_color_parse_with_white_default (spec, &c2);
+#endif
make_color_inactive (self, &c2);
g_free (spec);