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 655212 - Update for libfolks API changes to AvatarDetails
Update for libfolks API changes to AvatarDetails
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Meta Contacts
3.1.x
Other All
: Normal major
: ---
Assigned To: empathy-maint
Depends on: 650414 655911
Blocks:
 
 
Reported: 2011-07-24 16:04 UTC by Philip Withnall
Modified: 2011-08-16 08:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update for libfolks API changes to AvatarDetails (7.27 KB, patch)
2011-07-24 16:07 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2011-07-24 16:04:23 UTC
Bug #650414 changes how avatars are handled in libfolks. Patch coming up to update Empathy accordingly.

(Note that the patch in bug #650414 hasn't yet been committed, but it hopefully will be soon.)
Comment 1 Philip Withnall 2011-07-24 16:07:24 UTC
Created attachment 192563 [details] [review]
Update for libfolks API changes to AvatarDetails
Comment 2 Danielle Madeley 2011-07-25 04:44:11 UTC
Review of attachment 192563 [details] [review]:

Looks fine to me, minus one style thing.

Seriously though, why isn't there API to load a loadable icon into a GdkPixbufLoader, that seems like it would be useful, and cut out a lot of code (is that worth filing a bug to ask for?).

::: libempathy-gtk/empathy-ui-utils.c
@@ +560,3 @@
 {
+	g_object_unref (closure->cancellable);
+	tp_clear_object (&(closure->loader));

You don't need these brackets. -> binds more tightly than & and since we don't use brackets anywhere else, it makes this confusing to read.
Comment 3 Philip Withnall 2011-07-25 18:32:33 UTC
(In reply to comment #2)
> Review of attachment 192563 [details] [review]:
> 
> Looks fine to me, minus one style thing.
> 
> Seriously though, why isn't there API to load a loadable icon into a
> GdkPixbufLoader, that seems like it would be useful, and cut out a lot of code
> (is that worth filing a bug to ask for?).

There's gdk_pixbuf_new_from_stream() which would be great, except it doesn't support the fine-grained scale control that GdkPixbufLoader::size-prepared gives us.

I guess one tiny advantage of the approach we're forced to take is that we can bail earlier if the image header is corrupt/not recognised (and thus not read more of the input stream than necessary).

> ::: libempathy-gtk/empathy-ui-utils.c
> @@ +560,3 @@
>  {
> +    g_object_unref (closure->cancellable);
> +    tp_clear_object (&(closure->loader));
> 
> You don't need these brackets. -> binds more tightly than & and since we don't
> use brackets anywhere else, it makes this confusing to read.

OK. I'll fix that before committing. Thanks.
Comment 4 Guillaume Desmottes 2011-08-15 06:30:22 UTC
Would be cool to fix this ASAP so Empathy 3.1 can use Folks 0.6
Comment 5 Raul Gutierrez Segales 2011-08-16 00:25:15 UTC
Patch works nicely for me. Philip: anything besides what has been pointed out in the comments that you'd like to see address before we push this?
Comment 6 Philip Withnall 2011-08-16 07:01:18 UTC
(In reply to comment #5)
> Patch works nicely for me. Philip: anything besides what has been pointed out
> in the comments that you'd like to see address before we push this?

Can't think of anything else. If nobody else gets there first, I'll tidy this up and push it tonight.
Comment 7 Guillaume Desmottes 2011-08-16 08:22:47 UTC
Merged to master.