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 742530 - um-crop-area: Fix deprecated API usage
um-crop-area: Fix deprecated API usage
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-01-07 15:15 UTC by Rui Matos
Modified: 2015-01-07 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
um-crop-area: Fix background rendering around the picture (5.71 KB, patch)
2015-01-07 15:15 UTC, Rui Matos
committed Details | Review
um-crop-area: Enforce a minimum size (1.65 KB, patch)
2015-01-07 15:15 UTC, Rui Matos
committed Details | Review
um-crop-area: Fix deprecated API usage (1.04 KB, patch)
2015-01-07 15:15 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-01-07 15:15:45 UTC
These patches were made for g-c-c (see bug 740986) but they also apply
to cheese.
Comment 1 Rui Matos 2015-01-07 15:15:47 UTC
Created attachment 294037 [details] [review]
um-crop-area: Fix background rendering around the picture

Instead of trying to fill the displayed pixbuf with the background
color (and failing at that), just make the pixbuf be an aspect correct
scaled size of the original picture and draw it at the correct offset
on the draw vfunc.

This allows us to get rid of deprecated gtk+ API usage and fixes the
background around the picture ending up black despite de code's
intent.
Comment 2 Rui Matos 2015-01-07 15:15:53 UTC
Created attachment 294038 [details] [review]
um-crop-area: Enforce a minimum size

Otherwise, if callers aren't careful, users could resize us so small
that we'd crash inside gdk_pixbuf_scale() .
Comment 3 Rui Matos 2015-01-07 15:15:56 UTC
Created attachment 294039 [details] [review]
um-crop-area: Fix deprecated API usage
Comment 4 David King 2015-01-07 15:26:58 UTC
Review of attachment 294037 [details] [review]:

Go ahead.
Comment 5 David King 2015-01-07 15:27:13 UTC
Review of attachment 294038 [details] [review]:

Go ahead.
Comment 6 David King 2015-01-07 15:27:33 UTC
Review of attachment 294039 [details] [review]:

Go ahead.
Comment 7 Rui Matos 2015-01-07 15:41:15 UTC
Attachment 294037 [details] pushed as 8b5bc73 - um-crop-area: Fix background rendering around the picture
Attachment 294038 [details] pushed as 08ff9ff - um-crop-area: Enforce a minimum size
Attachment 294039 [details] pushed as 5741aa3 - um-crop-area: Fix deprecated API usage