[sylpheed:33485] Re: [PATCH] Gravatar support

Jan Stępień jan at stepien.cc
Mon Jan 11 01:26:34 JST 2010


On Sun, 10 Jan 2010 16:37:52 +0100
Antonio Ospite <ospite at studenti.unina.it> wrote:
> On Sat, 9 Jan 2010 18:25:59 +0100
> Jan Stępień <jan at stepien.cc> wrote:
> > I've created a patch for Sylpheed 3.0.0beta4 which allows to display a
> > gravatar [1] of the sender of a message instead of showing his X-Face.
> 
> I've tested it and it works, after disabling compface at configure-time
> as the code abuses #if HAVE_LIBCOMPFACE.
> 

As you've noticed it's just an early version to see what will be the
response of the Sylpheed community. The patch will surely need to be
better integrated in order not to abuse compface and other existing
features.

> > It's based on bits found in update_check.c and headerview.c. It works
> > but it requires quite a lot of touch ups, for instance
> > 
> >   * Caching gravatars locally
> >   * Enabling/disabling gravatars fetching in settings
> >   * Handling a situation when a gravatar isn't available due to a 404
> >   * Offline state
> 
> Could the latter be handled by downloading the image at receiving-time
> (we are very likely online at that time), and providing a bulk
> operation to get/refresh images for old mails? Trying a connection on
> each headerview rendering looks sub-optimal.
> 

The idea of downloading images at the time of receiving sounds like a
good solution. Initially I've been thinking about downloading each
image once only on headerview rendering and afterwards storing it in
~/.sylpheed-2.0/gravatar_cache to be used on subsequent headerview
refreshes. I think that the idea of yours is better, though.

> >   * Portability
> > 
> > Please let me know what do you think about it. Do you find it useful?
> >
> 
> I know that this patch is just to "test the water" (to see if there is
> any chance this is going to be integrated) before you put more effort
> into a final implementation, but I am writing my opinions anyway:
>   - What about using libcurl directly instead of spawning a separate
>     process?

I've stolen an exitisting solution found in update_check.c. Using
libcurl directly seems like a better idea. I'd like to hear what's
Hiroyuki's opinion about it. I assume he'd like to keep downloading
over HTTP consistent.

>   - What about showing both the X-Face and the gravatar like gmane does?
>     X-Face users are usually advanced users who took good care of
>     setting up their extra header, don't ignore them. Alternatively I'd
>     say to rely on gravatar only when X-Face is missing; as I said if
>     someone set up a X-Face, they want to have it shown anyways :)

Sure. I think that fetching a gravatar only if an X-Face isn't present
is a good idea. From my point of view showing both the X-Face and the
gravatar, like gmane does, doesn't look good.

>   - When using images with transparency, the problem I described
>     here: http://article.gmane.org/gmane.mail.sylpheed.general/16081
>     is even more evident, try to trigger it by resizing your window or
>     sending a mail with a very long recipient list, and comment there,
>     please.

Yeah, I'm aware of it, I saw it when I was testing my patch. I hope
someone will come up with a solution for it soon.

Grazie per commenti.

Kind regards,
-- 
Jan Stępień <jan at stepien.cc>


More information about the Sylpheed mailing list