Commits
David B. Evans authored 687c7dc56b0
1 + | From ed03e9c49faafba132ab4077daeaf213b541aed7 Mon Sep 17 00:00:00 2001 |
2 + | From: Robert Ancell <robert.ancell@canonical.com> |
3 + | Date: Tue, 26 Sep 2017 14:12:13 -0400 |
4 + | Subject: [PATCH] background: Remove GdkColor deprecation warnings |
5 + | |
6 + | https://bugzilla.gnome.org/show_bug.cgi?id=788205 |
7 + | --- |
8 + | panels/background/cc-background-item.c | 19 ++++++++++--------- |
9 + | 2 files changed, 11 insertions(+), 10 deletions(-) |
10 + | |
11 + | diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c |
12 + | index accf2ed..13c6583 100644 |
13 + | --- panels/background/cc-background-item.c.orig 2017-11-01 09:06:20.000000000 -0700 |
14 + | +++ panels/background/cc-background-item.c 2018-04-03 15:37:41.000000000 -0700 |
15 + | |
16 + | static void |
17 + | set_bg_properties (CcBackgroundItem *item) |
18 + | { |
19 + | - GdkColor pcolor = { 0, 0, 0, 0 }; |
20 + | - GdkColor scolor = { 0, 0, 0, 0 }; |
21 + | + GdkRGBA pcolor = { 0, 0, 0, 0 }; |
22 + | + GdkRGBA scolor = { 0, 0, 0, 0 }; |
23 + | + GdkColor p, s; |
24 + | |
25 + | if (item->priv->uri) { |
26 + | GFile *file; |
27 + | |
28 + | } |
29 + | |
30 + | if (item->priv->primary_color != NULL) { |
31 + | - gdk_color_parse (item->priv->primary_color, &pcolor); |
32 + | + gdk_rgba_parse(item->priv->primary_color, &pcolor); |
33 + | } |
34 + | if (item->priv->secondary_color != NULL) { |
35 + | - gdk_color_parse (item->priv->secondary_color, &scolor); |
36 + | + gdk_rgba_parse (item->priv->secondary_color, &scolor); |
37 + | } |
38 + | |
39 + | - gnome_bg_set_color (item->priv->bg, item->priv->shading, &pcolor, &scolor); |
40 + | + gnome_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor); |
41 + | gnome_bg_set_placement (item->priv->bg, item->priv->placement); |
42 + | } |
43 + | |
44 + | |
45 + | colors_equal (const char *a, |
46 + | const char *b) |
47 + | { |
48 + | - GdkColor color1, color2; |
49 + | + GdkRGBA color1, color2; |
50 + | |
51 + | - gdk_color_parse (a, &color1); |
52 + | - gdk_color_parse (b, &color2); |
53 + | + gdk_rgba_parse (&color1, a); |
54 + | + gdk_rgba_parse (&color2, b); |
55 + | |
56 + | - return gdk_color_equal (&color1, &color2); |
57 + | + return gdk_rgba_equal (&color1, &color2); |
58 + | } |
59 + | |
60 + | gboolean |