[gnome-control-center] background: Remove GdkColor deprecation warnings
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Remove GdkColor deprecation warnings
- Date: Wed, 31 Jan 2018 20:11:38 +0000 (UTC)
commit ed03e9c49faafba132ab4077daeaf213b541aed7
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Sep 26 14:12:13 2017 -0400
background: Remove GdkColor deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=788205
meson.build | 2 +-
panels/background/cc-background-item.c | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9e48d16..02eb6e2 100644
--- a/meson.build
+++ b/meson.build
@@ -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')
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index accf2ed..13c6583 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]