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
=== modified file 'configure.ac'
--- configure.ac 2019-05-01 13:16:51 +0000
+++ configure.ac 2020-02-25 16:05:10 +0000
@@ -139,7 +139,7 @@
139PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11139PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11
140 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)140 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
141PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0141PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
142 gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)142 gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION libunity-settings-daemon)
143PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames143PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap geonames
144 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)144 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
145PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES libunity-settings-daemon x11)145PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES libunity-settings-daemon x11)
146146
=== modified file 'debian/rules'
--- debian/rules 2019-09-02 14:41:58 +0000
+++ debian/rules 2020-02-25 16:05:10 +0000
@@ -18,6 +18,6 @@
18DEB_DH_MAKESHLIBS_ARGS_libunity-control-center1 += -- -c418DEB_DH_MAKESHLIBS_ARGS_libunity-control-center1 += -- -c4
1919
20binary-post-install/unity-control-center::20binary-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.png21 ./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
2222
23common-binary-post-install-arch:: list-missing23common-binary-post-install-arch:: list-missing
2424
=== modified file 'panels/appearance/cc-appearance-item.c'
--- panels/appearance/cc-appearance-item.c 2018-02-16 13:02:27 +0000
+++ panels/appearance/cc-appearance-item.c 2020-02-25 16:05:10 +0000
@@ -26,7 +26,7 @@
26#include <gio/gio.h>26#include <gio/gio.h>
27#include <glib/gi18n-lib.h>27#include <glib/gi18n-lib.h>
2828
29#include <libgnome-desktop/gnome-bg.h>29#include <libunity-settings-daemon/gsd-bg.h>
30#include <gdesktop-enums.h>30#include <gdesktop-enums.h>
3131
32#include "cc-appearance-item.h"32#include "cc-appearance-item.h"
@@ -51,7 +51,7 @@
51 CcAppearanceItemFlags flags;51 CcAppearanceItemFlags flags;
5252
53 /* internal */53 /* internal */
54 GnomeBG *bg;54 GsdBG *bg;
55 char *mime_type;55 char *mime_type;
56 int width;56 int width;
57 int height;57 int height;
@@ -105,7 +105,7 @@
105 filename = g_file_get_path (file);105 filename = g_file_get_path (file);
106 g_object_unref (file);106 g_object_unref (file);
107107
108 gnome_bg_set_filename (item->priv->bg, filename);108 gsd_bg_set_filename (item->priv->bg, filename);
109 g_free (filename);109 g_free (filename);
110 }110 }
111111
@@ -116,8 +116,8 @@
116 gdk_rgba_parse (&scolor, item->priv->secondary_color);116 gdk_rgba_parse (&scolor, item->priv->secondary_color);
117 }117 }
118118
119 gnome_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor);119 gsd_bg_set_rgba (item->priv->bg, item->priv->shading, &pcolor, &scolor);
120 gnome_bg_set_placement (item->priv->bg, item->priv->placement);120 gsd_bg_set_placement (item->priv->bg, item->priv->placement);
121}121}
122122
123123
@@ -130,7 +130,7 @@
130130
131 changes = FALSE;131 changes = FALSE;
132 if (item->priv->bg != NULL) {132 if (item->priv->bg != NULL) {
133 changes = gnome_bg_changes_with_time (item->priv->bg);133 changes = gsd_bg_changes_with_time (item->priv->bg);
134 }134 }
135 return changes;135 return changes;
136}136}
@@ -144,7 +144,7 @@
144 if (item->priv->uri == NULL) {144 if (item->priv->uri == NULL) {
145 item->priv->size = g_strdup ("");145 item->priv->size = g_strdup ("");
146 } else {146 } else {
147 if (gnome_bg_has_multiple_sizes (item->priv->bg) || gnome_bg_changes_with_time (item->priv->bg)) {147 if (gsd_bg_has_multiple_sizes (item->priv->bg) || gsd_bg_changes_with_time (item->priv->bg)) {
148 item->priv->size = g_strdup (_("multiple sizes"));148 item->priv->size = g_strdup (_("multiple sizes"));
149 } else {149 } else {
150 /* translators: 100 × 100px150 /* translators: 100 × 100px
@@ -157,14 +157,14 @@
157}157}
158158
159static GdkPixbuf *159static GdkPixbuf *
160render_at_size (GnomeBG *bg,160render_at_size (GsdBG *bg,
161 gint width,161 gint width,
162 gint height)162 gint height)
163{163{
164 GdkPixbuf *pixbuf;164 GdkPixbuf *pixbuf;
165165
166 pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);166 pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
167 gnome_bg_draw (bg, pixbuf, gdk_screen_get_default (), FALSE);167 gsd_bg_draw (bg, pixbuf, gdk_screen_get_default (), FALSE);
168168
169 return pixbuf;169 return pixbuf;
170}170}
@@ -189,21 +189,21 @@
189 /* FIXME: this doesn't play nice with slideshow stepping at all,189 /* FIXME: this doesn't play nice with slideshow stepping at all,
190 * because it will always render the current slideshow frame, which190 * because it will always render the current slideshow frame, which
191 * might not be what we want.191 * might not be what we want.
192 * We're lacking an API to draw a high-res GnomeBG manually choosing192 * We're lacking an API to draw a high-res GsdBG manually choosing
193 * the slideshow frame though, so we can't do much better than this193 * the slideshow frame though, so we can't do much better than this
194 * for now.194 * for now.
195 */195 */
196 pixbuf = render_at_size (item->priv->bg, width, height);196 pixbuf = render_at_size (item->priv->bg, width, height);
197 } else {197 } else {
198 if (frame >= 0) {198 if (frame >= 0) {
199 pixbuf = gnome_bg_create_frame_thumbnail (item->priv->bg,199 pixbuf = gsd_bg_create_frame_thumbnail (item->priv->bg,
200 thumbs,200 thumbs,
201 gdk_screen_get_default (),201 gdk_screen_get_default (),
202 width,202 width,
203 height,203 height,
204 frame);204 frame);
205 } else {205 } else {
206 pixbuf = gnome_bg_create_thumbnail (item->priv->bg,206 pixbuf = gsd_bg_create_thumbnail (item->priv->bg,
207 thumbs,207 thumbs,
208 gdk_screen_get_default (),208 gdk_screen_get_default (),
209 width,209 width,
@@ -213,7 +213,7 @@
213213
214 if (pixbuf != NULL214 if (pixbuf != NULL
215 && frame != -2215 && frame != -2
216 && gnome_bg_changes_with_time (item->priv->bg)) {216 && gsd_bg_changes_with_time (item->priv->bg)) {
217 GEmblem *emblem;217 GEmblem *emblem;
218218
219 emblem = get_slideshow_icon ();219 emblem = get_slideshow_icon ();
@@ -224,7 +224,7 @@
224 icon = G_ICON (pixbuf);224 icon = G_ICON (pixbuf);
225 }225 }
226226
227 gnome_bg_get_image_size (item->priv->bg,227 gsd_bg_get_image_size (item->priv->bg,
228 thumbs,228 thumbs,
229 width,229 width,
230 height,230 height,
@@ -734,7 +734,7 @@
734{734{
735 item->priv = CC_APPEARANCE_ITEM_GET_PRIVATE (item);735 item->priv = CC_APPEARANCE_ITEM_GET_PRIVATE (item);
736736
737 item->priv->bg = gnome_bg_new ();737 item->priv->bg = gsd_bg_new ();
738738
739 item->priv->shading = G_DESKTOP_BACKGROUND_SHADING_SOLID;739 item->priv->shading = G_DESKTOP_BACKGROUND_SHADING_SOLID;
740 item->priv->placement = G_DESKTOP_BACKGROUND_STYLE_SCALED;740 item->priv->placement = G_DESKTOP_BACKGROUND_STYLE_SCALED;
741741
=== modified file 'panels/appearance/cc-appearance-item.h'
--- panels/appearance/cc-appearance-item.h 2013-12-02 02:45:53 +0000
+++ panels/appearance/cc-appearance-item.h 2020-02-25 16:05:10 +0000
@@ -20,11 +20,13 @@
20#ifndef __CC_APPEARANCE_ITEM_H20#ifndef __CC_APPEARANCE_ITEM_H
21#define __CC_APPEARANCE_ITEM_H21#define __CC_APPEARANCE_ITEM_H
2222
23#define GNOME_DESKTOP_USE_UNSTABLE_API
24
23#include <glib-object.h>25#include <glib-object.h>
2426
25#include <libgnome-desktop/gnome-desktop-thumbnail.h>27#include <libgnome-desktop/gnome-desktop-thumbnail.h>
28#include <libunity-settings-daemon/gsd-bg.h>
26#include <gdesktop-enums.h>29#include <gdesktop-enums.h>
27#include <libgnome-desktop/gnome-bg.h>
2830
29G_BEGIN_DECLS31G_BEGIN_DECLS
3032

Subscribers

People subscribed via source and target branches