Commit ed03e9c4 authored by Robert Ancell's avatar Robert Ancell

background: Remove GdkColor deprecation warnings

https://bugzilla.gnome.org/show_bug.cgi?id=788205
parent f57a1925
......@@ -105,7 +105,7 @@ colord_dep = dependency('colord', version: '>= 0.1.34')
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.23.0')
gio_dep = dependency('gio-2.0')
glib_dep = dependency('glib-2.0', version: '>= 2.53.0')
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.1.0')
gnome_desktop_dep = dependency('gnome-desktop-3.0', version: '>= 3.27.3')
gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.25.90')
goa_dep = dependency('goa-1.0', version: goa_req_version)
gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 3.27.2')
......
......@@ -141,8 +141,9 @@ get_emblemed_pixbuf (CcBackgroundItem *item, GdkPixbuf *pixbuf, gint scale_facto
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->uri) {
g_autoptr(GFile) file = NULL;
......@@ -154,13 +155,13 @@ set_bg_properties (CcBackgroundItem *item)
}
if (item->primary_color != NULL) {
gdk_color_parse (item->primary_color, &pcolor);
gdk_rgba_parse (&pcolor, item->primary_color);
}
if (item->secondary_color != NULL) {
gdk_color_parse (item->secondary_color, &scolor);
gdk_rgba_parse (&scolor, item->secondary_color);
}
gnome_bg_set_color (item->bg, item->shading, &pcolor, &scolor);
gnome_bg_set_rgba (item->bg, item->shading, &pcolor, &scolor);
gnome_bg_set_placement (item->bg, item->placement);
}
......@@ -969,12 +970,12 @@ static gboolean
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment