After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789840 - gnome-bg: Add new GdkRGBA methods to replace deprecated GdkColor methods
gnome-bg: Add new GdkRGBA methods to replace deprecated GdkColor methods
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
git master
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-03 02:12 UTC by Robert Ancell
Modified: 2018-01-30 20:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome-bg: Add new GdkRGBA methods to replace deprecated GdkColor methods (10.66 KB, patch)
2017-11-03 02:12 UTC, Robert Ancell
none Details | Review
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods (9.74 KB, patch)
2017-11-15 21:08 UTC, Robert Ancell
none Details | Review
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods (9.89 KB, patch)
2018-01-29 02:06 UTC, Robert Ancell
none Details | Review
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods (9.94 KB, patch)
2018-01-29 20:18 UTC, Robert Ancell
none Details | Review

Description Robert Ancell 2017-11-03 02:12:15 UTC
Add new GdkRGBA methods to replace deprecated GdkColor methods. This allows G-C-C to drop the use of GdkColor (bug 788205)
Comment 1 Robert Ancell 2017-11-03 02:12:42 UTC
Created attachment 362862 [details] [review]
gnome-bg: Add new GdkRGBA methods to replace deprecated GdkColor methods
Comment 2 Bastien Nocera 2017-11-15 18:20:26 UTC
Review of attachment 362862 [details] [review]:

I'd rather we removed the GdkColor usage altogether. As far as I know, this should only impact gnome-control-center (with calls to gnome_bg_set_color()).
Comment 3 Robert Ancell 2017-11-15 21:08:57 UTC
Created attachment 363764 [details] [review]
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods

Is this what you expect? This will of course be an API/ABI break. We could keep the same method names but that would be a more obscure break when you ran against the wrong library.
Comment 4 Georges Basile Stavracas Neto 2018-01-26 02:40:36 UTC
Review of attachment 363764 [details] [review]:

This patch looks good to me. Bastien, do you have any additional thoughts?
Comment 5 Bastien Nocera 2018-01-26 09:13:35 UTC
Review of attachment 363764 [details] [review]:

It's missing a change of LT_VERSION in configure.ac. Are there also patches for gnome-control-center around?

::: libgnome-desktop/gnome-bg.c
@@ +1127,3 @@
 		color.green = (bg->primary.green + bg->secondary.green) / 2;
 		color.blue = (bg->primary.blue + bg->secondary.blue) / 2;
+		color.alpha = (bg->primary.alpha + bg->secondary.alpha) / 2;

Is that necessary? It's not used later on.
Comment 6 Robert Ancell 2018-01-29 02:06:40 UTC
Created attachment 367558 [details] [review]
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods

Updated with review feedback.
Comment 7 Bastien Nocera 2018-01-29 12:52:24 UTC
Review of attachment 367558 [details] [review]:

Looks good. Waiting on the gnome-control-center patch before committing. Thanks!
Comment 8 Robert Ancell 2018-01-29 20:17:32 UTC
The g-c-c patch is in bug 788205 (see this bugs description)
Comment 9 Robert Ancell 2018-01-29 20:18:37 UTC
Created attachment 367606 [details] [review]
gnome-bg: Add new GdkRGBA methods to replace obsolete GdkColor methods

Added bug link