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

Jan Stępień jan at stepien.cc
Wed Jan 13 06:30:12 JST 2010


Hello,

On Tue, 12 Jan 2010 15:06:42 +0900
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp> 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.
> > 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
> >   * Portability
> > 
> > Please let me know what do you think about it. Do you find it useful?
> 
> Some comments with brief looking:
> 
> - This type of feature probably should be implemented as a plug-in
>   (currently there is no plug-in APIs for these features, they must be
>    implemented in the future)
> - Sylpheed has internal MD5 routine (libsylph/md5.[ch]), so you don't
>   have to depend on OpenSSL
> - downloading_cb() must be surrounded by
>   gdk_threads_enter()/gdk_threads_leave()
> - g_assert() is overkill, g_return_if_fail() is better
> - use g_snprintf() instead of g_sprintf()
>

Thank you for your comments. I've attached an updated version of the
patch. I have

 - Added caching in ~/.sylpheed-2.0/gravatarcache
 - Added gdk_threads_enter()/gdk_threads_leave()
 - Added some #includes in order to make it compile cleanly with -Wall
 - Replaced g_assert() with g_return_if_fail()
 - Replaced g_sprintf() with g_snprintf()
 - Removed OpenSSL dependency by using libsylph/md5.[ch]
 - Done some other minor changes

A diff between this patch and the previous one can be seen at
http://pastie.org/775559 .

I'm waiting for your feedback.

Kind regards,
-- 
Jan Stępień <jan at stepien.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gravatar-2.patch
Type: text/x-diff
Size: 7806 bytes
Desc: not available
Url : http://www.sraoss.jp/pipermail/sylpheed/attachments/20100112/9619c0c6/attachment.bin 


More information about the Sylpheed mailing list