From ed03e9c49faafba132ab4077daeaf213b541aed7 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Tue, 26 Sep 2017 14:12:13 -0400 Subject: [PATCH] background: Remove GdkColor deprecation warnings https://bugzilla.gnome.org/show_bug.cgi?id=788205 --- panels/background/cc-background-item.c | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c index accf2ed..13c6583 100644 --- panels/background/cc-background-item.c.orig 2017-11-01 09:06:20.000000000 -0700 +++ panels/background/cc-background-item.c 2018-04-03 15:37:41.000000000 -0700 @@ -150,8 +150,9 @@ static void set_bg_properties (CcBackgroundItem *item) { - GdkColor pcolor = { 0, 0, 0, 0 }; - GdkColor scolor = { 0, 0, 0, 0 }; + GdkRGBA pcolor = { 0, 0, 0, 0 }; + GdkRGBA scolor = { 0, 0, 0, 0 }; + GdkColor p, s; if (item->priv->uri) { GFile *file; @@ -166,13 +167,13 @@ } if (item->priv->primary_color != NULL) { - gdk_color_parse (item->priv->primary_color, &pcolor); + gdk_rgba_parse(item->priv->primary_color, &pcolor); } if (item->priv->secondary_color != NULL) { - gdk_color_parse (item->priv->secondary_color, &scolor); + gdk_rgba_parse (item->priv->secondary_color, &scolor); } - gnome_bg_set_color (item->priv->bg, item->priv->shading, &pcolor, &scolor); + gnome_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor); gnome_bg_set_placement (item->priv->bg, item->priv->placement); } @@ -996,12 +997,12 @@ colors_equal (const char *a, const char *b) { - GdkColor color1, color2; + GdkRGBA color1, color2; - gdk_color_parse (a, &color1); - gdk_color_parse (b, &color2); + gdk_rgba_parse (&color1, a); + gdk_rgba_parse (&color2, b); - return gdk_color_equal (&color1, &color2); + return gdk_rgba_equal (&color1, &color2); } gboolean