Merge lp:~khurshid-alam/unity-control-center/drop-gnomebg into lp:unity-control-center

Proposed by Khurshid Alam
Status: Merged
Merged at revision: 12925
Proposed branch: lp:~khurshid-alam/unity-control-center/drop-gnomebg
Merge into: lp:unity-control-center
Diff against target: 171 lines (+20/-18)
4 files modified
configure.ac (+1/-1)
debian/rules (+1/-1)
panels/appearance/cc-appearance-item.c (+15/-15)
panels/appearance/cc-appearance-item.h (+3/-1)
To merge this branch: bzr merge lp:~khurshid-alam/unity-control-center/drop-gnomebg
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+379826@code.launchpad.net

Commit message

* Drop libgnome-desktop for background drawing. Use libunity-settings-daemon instead. LP: #1863584

* Update version to 20.04 LTS

Description of the change

Note it must be compiled against new unity-settings-daemon in https://code.launchpad.net/~khurshid-alam/unity-settings-daemon/drop-gnomebg/+merge/379825

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2019-05-01 13:16:51 +0000
3+++ configure.ac 2020-02-25 16:05:10 +0000
4@@ -139,7 +139,7 @@
5 PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11
6 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
7 PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
8- gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
9+ gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION libunity-settings-daemon)
10 PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames
11 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
12 PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES libunity-settings-daemon x11)
13
14=== modified file 'debian/rules'
15--- debian/rules 2019-09-02 14:41:58 +0000
16+++ debian/rules 2020-02-25 16:05:10 +0000
17@@ -18,6 +18,6 @@
18 DEB_DH_MAKESHLIBS_ARGS_libunity-control-center1 += -- -c4
19
20 binary-post-install/unity-control-center::
21- ./panels/info/logo-generator --logo panels/info/UbuntuLogoBlank.png --text "ubuntu 19.10" --output debian/unity-control-center/usr/share/unity-control-center/ui/UbuntuLogo.png
22+ ./panels/info/logo-generator --logo panels/info/UbuntuLogoBlank.png --text "ubuntu 20.04 LTS" --output debian/unity-control-center/usr/share/unity-control-center/ui/UbuntuLogo.png
23
24 common-binary-post-install-arch:: list-missing
25
26=== modified file 'panels/appearance/cc-appearance-item.c'
27--- panels/appearance/cc-appearance-item.c 2018-02-16 13:02:27 +0000
28+++ panels/appearance/cc-appearance-item.c 2020-02-25 16:05:10 +0000
29@@ -26,7 +26,7 @@
30 #include <gio/gio.h>
31 #include <glib/gi18n-lib.h>
32
33-#include <libgnome-desktop/gnome-bg.h>
34+#include <libunity-settings-daemon/gsd-bg.h>
35 #include <gdesktop-enums.h>
36
37 #include "cc-appearance-item.h"
38@@ -51,7 +51,7 @@
39 CcAppearanceItemFlags flags;
40
41 /* internal */
42- GnomeBG *bg;
43+ GsdBG *bg;
44 char *mime_type;
45 int width;
46 int height;
47@@ -105,7 +105,7 @@
48 filename = g_file_get_path (file);
49 g_object_unref (file);
50
51- gnome_bg_set_filename (item->priv->bg, filename);
52+ gsd_bg_set_filename (item->priv->bg, filename);
53 g_free (filename);
54 }
55
56@@ -116,8 +116,8 @@
57 gdk_rgba_parse (&scolor, item->priv->secondary_color);
58 }
59
60- gnome_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor);
61- gnome_bg_set_placement (item->priv->bg, item->priv->placement);
62+ gsd_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor);
63+ gsd_bg_set_placement (item->priv->bg, item->priv->placement);
64 }
65
66
67@@ -130,7 +130,7 @@
68
69 changes = FALSE;
70 if (item->priv->bg != NULL) {
71- changes = gnome_bg_changes_with_time (item->priv->bg);
72+ changes = gsd_bg_changes_with_time (item->priv->bg);
73 }
74 return changes;
75 }
76@@ -144,7 +144,7 @@
77 if (item->priv->uri == NULL) {
78 item->priv->size = g_strdup ("");
79 } else {
80- if (gnome_bg_has_multiple_sizes (item->priv->bg) || gnome_bg_changes_with_time (item->priv->bg)) {
81+ if (gsd_bg_has_multiple_sizes (item->priv->bg) || gsd_bg_changes_with_time (item->priv->bg)) {
82 item->priv->size = g_strdup (_("multiple sizes"));
83 } else {
84 /* translators: 100 × 100px
85@@ -157,14 +157,14 @@
86 }
87
88 static GdkPixbuf *
89-render_at_size (GnomeBG *bg,
90+render_at_size (GsdBG *bg,
91 gint width,
92 gint height)
93 {
94 GdkPixbuf *pixbuf;
95
96 pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
97- gnome_bg_draw (bg, pixbuf, gdk_screen_get_default (), FALSE);
98+ gsd_bg_draw (bg, pixbuf, gdk_screen_get_default (), FALSE);
99
100 return pixbuf;
101 }
102@@ -189,21 +189,21 @@
103 /* FIXME: this doesn't play nice with slideshow stepping at all,
104 * because it will always render the current slideshow frame, which
105 * might not be what we want.
106- * We're lacking an API to draw a high-res GnomeBG manually choosing
107+ * We're lacking an API to draw a high-res GsdBG manually choosing
108 * the slideshow frame though, so we can't do much better than this
109 * for now.
110 */
111 pixbuf = render_at_size (item->priv->bg, width, height);
112 } else {
113 if (frame >= 0) {
114- pixbuf = gnome_bg_create_frame_thumbnail (item->priv->bg,
115+ pixbuf = gsd_bg_create_frame_thumbnail (item->priv->bg,
116 thumbs,
117 gdk_screen_get_default (),
118 width,
119 height,
120 frame);
121 } else {
122- pixbuf = gnome_bg_create_thumbnail (item->priv->bg,
123+ pixbuf = gsd_bg_create_thumbnail (item->priv->bg,
124 thumbs,
125 gdk_screen_get_default (),
126 width,
127@@ -213,7 +213,7 @@
128
129 if (pixbuf != NULL
130 && frame != -2
131- && gnome_bg_changes_with_time (item->priv->bg)) {
132+ && gsd_bg_changes_with_time (item->priv->bg)) {
133 GEmblem *emblem;
134
135 emblem = get_slideshow_icon ();
136@@ -224,7 +224,7 @@
137 icon = G_ICON (pixbuf);
138 }
139
140- gnome_bg_get_image_size (item->priv->bg,
141+ gsd_bg_get_image_size (item->priv->bg,
142 thumbs,
143 width,
144 height,
145@@ -734,7 +734,7 @@
146 {
147 item->priv = CC_APPEARANCE_ITEM_GET_PRIVATE (item);
148
149- item->priv->bg = gnome_bg_new ();
150+ item->priv->bg = gsd_bg_new ();
151
152 item->priv->shading = G_DESKTOP_BACKGROUND_SHADING_SOLID;
153 item->priv->placement = G_DESKTOP_BACKGROUND_STYLE_SCALED;
154
155=== modified file 'panels/appearance/cc-appearance-item.h'
156--- panels/appearance/cc-appearance-item.h 2013-12-02 02:45:53 +0000
157+++ panels/appearance/cc-appearance-item.h 2020-02-25 16:05:10 +0000
158@@ -20,11 +20,13 @@
159 #ifndef __CC_APPEARANCE_ITEM_H
160 #define __CC_APPEARANCE_ITEM_H
161
162+#define GNOME_DESKTOP_USE_UNSTABLE_API
163+
164 #include <glib-object.h>
165
166 #include <libgnome-desktop/gnome-desktop-thumbnail.h>
167+#include <libunity-settings-daemon/gsd-bg.h>
168 #include <gdesktop-enums.h>
169-#include <libgnome-desktop/gnome-bg.h>
170
171 G_BEGIN_DECLS
172

Subscribers

People subscribed via source and target branches