Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From a4ed38e95cbe07f02028249b8b315565a5ac1e43 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 5 May 2018 22:32:45 -0700 |
| 4 | Subject: [PATCH] nautilus: drop gnome-desktop thumbnail API with new |
| 5 | gdk-pixbuf |
| 6 | MIME-Version: 1.0 |
| 7 | Content-Type: text/plain; charset=UTF-8 |
| 8 | Content-Transfer-Encoding: 8bit |
| 9 | |
| 10 | If gdk-pixbuf >= 2.36.5 is available, its scaling API can do what we |
| 11 | want, so we don’t need to use the deprecated gnome-desktop one. |
| 12 | |
| 13 | Also fixes compile errors seen on master |
| 14 | nautilus-properties-window.c:5101: undefined reference to `gnome_desktop_thumbnail_scale_down_pixbuf' |
| 15 | |
| 16 | Upstream-Status: Backport |
| 17 | |
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 19 | --- |
| 20 | src/nautilus-properties-window.c | 5 +++-- |
| 21 | 1 file changed, 3 insertions(+), 2 deletions(-) |
| 22 | |
| 23 | diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c |
| 24 | index dea8b0f..fad9bd1 100644 |
| 25 | --- a/src/nautilus-properties-window.c |
| 26 | +++ b/src/nautilus-properties-window.c |
| 27 | @@ -5098,10 +5098,11 @@ update_preview_callback (GtkFileChooser *icon_chooser, |
| 28 | scale = (double)gdk_pixbuf_get_height (pixbuf) / |
| 29 | gdk_pixbuf_get_width (pixbuf); |
| 30 | |
| 31 | - scaled_pixbuf = gnome_desktop_thumbnail_scale_down_pixbuf |
| 32 | + scaled_pixbuf = gdk_pixbuf_scale_simple |
| 33 | (pixbuf, |
| 34 | PREVIEW_IMAGE_WIDTH, |
| 35 | - scale * PREVIEW_IMAGE_WIDTH); |
| 36 | + scale * PREVIEW_IMAGE_WIDTH, |
| 37 | + GDK_INTERP_HYPER); |
| 38 | g_object_unref (pixbuf); |
| 39 | pixbuf = scaled_pixbuf; |
| 40 | } |