1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
From 6c98cbb514b2a455dd27f3a32a48e43a65cd29a2 Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
Date: Tue, 26 Sep 2017 14:12:13 -0400
Subject: [PATCH 2/2] background: Remove GdkColor deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=788205
(cherry picked from commit ed03e9c49faafba132ab4077daeaf213b541aed7)
---
configure.ac | 2 +-
panels/background/cc-background-item.c | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 90579ac9f..f810bfb1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,7 +97,7 @@ NETWORK_MANAGER_REQUIRED_VERSION=1.2.0
NETWORK_MANAGER_APPLET_REQUIRED_VERSION=1.2.0
MODEM_MANAGER_REQUIRED_VERSION=0.7
LIBNOTIFY_REQUIRED_VERSION=0.7.3
-GNOME_DESKTOP_REQUIRED_VERSION=3.21.2
+GNOME_DESKTOP_REQUIRED_VERSION=3.27.3
SCHEMAS_REQUIRED_VERSION=3.21.4
LIBWACOM_REQUIRED_VERSION=0.7
CLUTTER_REQUIRED_VERSION=1.11.3
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index 92220f823..8f8759bd0 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -150,8 +150,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->priv->uri) {
GFile *file;
@@ -166,13 +167,13 @@ set_bg_properties (CcBackgroundItem *item)
}
if (item->priv->primary_color != NULL) {
- gdk_color_parse (item->priv->primary_color, &pcolor);
+ gdk_rgba_parse (&pcolor, item->priv->primary_color);
}
if (item->priv->secondary_color != NULL) {
- gdk_color_parse (item->priv->secondary_color, &scolor);
+ gdk_rgba_parse (&scolor, item->priv->secondary_color);
}
- 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 @@ 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
--
2.17.0
|