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 775991 - thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf()
thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf()
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: Thumbnail
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on: 80925
Blocks:
 
 
Reported: 2016-12-12 15:29 UTC by Bastien Nocera
Modified: 2017-02-03 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thumbnail: Remove gnome_desktop_thumbnail_scale_down_pixbuf() (7.21 KB, patch)
2016-12-12 15:29 UTC, Bastien Nocera
rejected Details | Review
thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf() (5.10 KB, patch)
2017-01-06 16:37 UTC, Bastien Nocera
none Details | Review
thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf() (5.67 KB, patch)
2017-02-03 18:03 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2016-12-12 15:29:24 UTC
.
Comment 1 Bastien Nocera 2016-12-12 15:29:28 UTC
Created attachment 341825 [details] [review]
thumbnail: Remove gnome_desktop_thumbnail_scale_down_pixbuf()

gnome-desktop is not a general purpose library for use by application
developers, but rather a convenience library for core desktop components
to share code. As such, it has no guarantee of API stability, and we can
remove functions without having to obsolete them.

Having said that, the internal user of this function was removed in bug
768064, and external users should be using the default gdk-pixbuf
scaling functions. If specific changes need to be made to those, they'll
need to be handled separately.
Comment 2 Michael Catanzaro 2016-12-13 01:39:39 UTC
Epiphany uses this, are you able to help with the migration...?
Comment 3 Michael Catanzaro 2016-12-13 02:47:39 UTC
(In reply to Michael Catanzaro from comment #2)
> Epiphany uses this, are you able to help with the migration...?

The solution is to just use gdk_pixbuf_scale_simple instead.
Comment 4 Bastien Nocera 2017-01-06 16:37:46 UTC
Created attachment 343037 [details] [review]
thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf()
Comment 5 Bastien Nocera 2017-01-06 16:39:55 UTC
(In reply to Michael Catanzaro from comment #3)
> (In reply to Michael Catanzaro from comment #2)
> > Epiphany uses this, are you able to help with the migration...?
> 
> The solution is to just use gdk_pixbuf_scale_simple instead.

Can you verify that you get a warning about the deprecation with this new patch?

If that's good enough, I'll bump the gdk-pixbuf requirement and push this for GNOME 3.24.
Comment 6 Michael Catanzaro 2017-01-06 18:32:04 UTC
Looks like the patch doesn't apply on gdk-pixbuf master?
Comment 7 Bastien Nocera 2017-01-06 20:23:02 UTC
It's a gnome-desktop patch
Comment 8 Michael Catanzaro 2017-01-06 22:48:25 UTC
(In reply to Bastien Nocera from comment #7)
> It's a gnome-desktop patch

Um, yup.

/home/mcatanzaro/src/jhbuild/checkout/epiphany/lib/ephy-snapshot-service.c: In function ‘ephy_snapshot_service_prepare_snapshot’:
/home/mcatanzaro/src/jhbuild/checkout/epiphany/lib/ephy-snapshot-service.c:138:5: warning: ‘gnome_desktop_thumbnail_scale_down_pixbuf’ is deprecated: Use 'gdk_pixbuf_scale_simple' instead [-Wdeprecated-declarations]
     scaled = gnome_desktop_thumbnail_scale_down_pixbuf (snapshot,
     ^~~~~~
In file included from /home/mcatanzaro/src/jhbuild/checkout/epiphany/lib/ephy-snapshot-service.c:29:0:
/home/mcatanzaro/src/jhbuild/install/include/gnome-desktop-3.0/libgnome-desktop/gnome-desktop-thumbnail.h:113:12: note: declared here
 GdkPixbuf *gnome_desktop_thumbnail_scale_down_pixbuf (GdkPixbuf          *pixbuf,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looks good.
Comment 9 Bastien Nocera 2017-01-09 15:48:48 UTC
Great, works as planned. Let's wait for the gdk-pixbuf changes to land.
Comment 10 Bastien Nocera 2017-02-03 18:03:23 UTC
Created attachment 344876 [details] [review]
thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf()

As scaling down by huge factors is now fixed in gdk-pixbuf. Require the
newer gdk-pixbuf as well, to avoid running into a pre-fix version.
Comment 11 Bastien Nocera 2017-02-03 18:04:54 UTC
Attachment 344876 [details] pushed as cb64228 - thumbnail: Deprecate gnome_desktop_thumbnail_scale_down_pixbuf()